Breaking Changes. Upgrade Script in Sql directory. Deployed
This commit is contained in:
1 parent
d4cfa92848
commit
9ed5843dbd
86 files changed
+2616
-2358
No files matched your search
@@ -15,7 +15,7 @@ namespace Tanshu.Accounts.Repository
|
||||
private readonly ISessionFactory factory;
|
||||
private SessionManager()
|
||||
{
|
||||
cfg = GetConfiguration();
|
||||
cfg = BuildConfiguration();
|
||||
factory = cfg.BuildSessionFactory();
|
||||
}
|
||||
|
||||
@@ -41,7 +41,11 @@ namespace Tanshu.Accounts.Repository
|
||||
internal static readonly SessionManager sessionManager = new SessionManager();
|
||||
}
|
||||
|
||||
public Configuration GetConfiguration()
|
||||
private Configuration GetConfiguration()
|
||||
{
|
||||
return cfg;
|
||||
}
|
||||
private Configuration BuildConfiguration()
|
||||
{
|
||||
var storeConfiguration = new StoreConfiguration();
|
||||
var persistenceModel = AutoMap.AssemblyOf<Voucher>(storeConfiguration)
|
||||
@@ -51,10 +55,11 @@ namespace Tanshu.Accounts.Repository
|
||||
c.Add<CustomForeignKeyConvention>();
|
||||
c.Add<ClassConvention>();
|
||||
c.Add<CascadeConvention>();
|
||||
c.Add<UniqueConvention>();
|
||||
c.Add<NotNullConvention>();
|
||||
c.Add<FormulaConvention>();
|
||||
//c.Add<AllowNullConvention>();
|
||||
//c.Add<NotNullConvention>();
|
||||
//c.Add(DefaultLazy.Never());
|
||||
//c.Add<EnumConvention>();
|
||||
c.Add<EnumConvention>();
|
||||
});
|
||||
|
||||
return Fluently.Configure()
|
||||
@@ -63,11 +68,11 @@ namespace Tanshu.Accounts.Repository
|
||||
.BuildConfiguration()
|
||||
.SetInterceptor(new NHSQLInterceptor());
|
||||
}
|
||||
public ISession GetSession()
|
||||
private ISession GetSession()
|
||||
{
|
||||
return factory.OpenSession();
|
||||
}
|
||||
public IStatelessSession GetStatelessSession()
|
||||
private IStatelessSession GetStatelessSession()
|
||||
{
|
||||
return factory.OpenStatelessSession();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user