|
@@ -17,6 +17,7 @@ namespace XdCxRhDW.Repostory
|
|
|
/// <summary>
|
|
|
/// 基础表上下文(id为int)
|
|
|
/// </summary>
|
|
|
+ [DbConfigurationType(typeof(SqliteConfiguration))]
|
|
|
public class RHDWContext : DbContext
|
|
|
{
|
|
|
public RHDWContext() : base("DbCon") //配置使用的连接名
|
|
@@ -59,7 +60,7 @@ namespace XdCxRhDW.Repostory
|
|
|
/// <summary>
|
|
|
/// 分区表上下文(id为long)
|
|
|
/// </summary>
|
|
|
- //[DbConfigurationType(typeof(SqliteConfiguration))]
|
|
|
+ [DbConfigurationType(typeof(SqliteConfiguration))]
|
|
|
public class RHDWPartContext : DbContext
|
|
|
{
|
|
|
public bool DatabaseExist = false;
|
|
@@ -116,7 +117,7 @@ namespace XdCxRhDW.Repostory
|
|
|
/// <summary>
|
|
|
/// 分区表上下文(id为long)
|
|
|
/// </summary>
|
|
|
- //[DbConfigurationType(typeof(SqliteConfiguration))]
|
|
|
+ [DbConfigurationType(typeof(PartSqliteInterceptor))]
|
|
|
public class RHDWPartReadContext : DbContext
|
|
|
{
|
|
|
public bool DatabaseExist = false;
|
|
@@ -158,7 +159,7 @@ namespace XdCxRhDW.Repostory
|
|
|
modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
|
|
|
modelBuilder.Configurations.AddFromAssembly(typeof(RHDWPartReadContext).Assembly);
|
|
|
Database.SetInitializer<RHDWPartReadContext>(null);
|
|
|
- DbInterception.Add(new PartSqliteInterceptor(this.dbFile));//拦截器
|
|
|
+ // DbInterception.Add(new PartSqliteInterceptor(this.dbFile));//拦截器
|
|
|
base.OnModelCreating(modelBuilder);
|
|
|
}
|
|
|
|