好的,已经修复完成
This commit is contained in:
@@ -19,7 +19,7 @@ namespace Yi.Framework.Core.Sqlsugar.Extensions
|
||||
var db = app.ApplicationServices.GetRequiredService<ISqlSugarClient>();
|
||||
var options = app.ApplicationServices.GetRequiredService<IOptions<DbConnOptions>>();
|
||||
|
||||
//if (options.Value.EnabledCodeFirst == false) return;
|
||||
if (options.Value.EnabledCodeFirst == false) return;
|
||||
|
||||
var assemblys = new List<Assembly>();
|
||||
|
||||
|
||||
@@ -22,22 +22,22 @@ namespace Yi.Framework.Core.Sqlsugar.Options
|
||||
/// <summary>
|
||||
/// 开启种子数据
|
||||
/// </summary>
|
||||
public bool EnabledDbSeed = false;
|
||||
public bool EnabledDbSeed { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 开启读写分离
|
||||
/// </summary>
|
||||
public bool EnabledReadWrite = false;
|
||||
public bool EnabledReadWrite { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 开启codefirst
|
||||
/// </summary>
|
||||
public bool EnabledCodeFirst = false;
|
||||
public bool EnabledCodeFirst { get; set; }=false;
|
||||
|
||||
/// <summary>
|
||||
/// 实体程序集
|
||||
/// </summary>
|
||||
public List<string>? EntityAssembly;
|
||||
public List<string>? EntityAssembly { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 读写分离
|
||||
|
||||
@@ -29,7 +29,6 @@ namespace Yi.Framework.Core.Sqlsugar
|
||||
|
||||
//这里替换过滤器实现
|
||||
services.AddScoped<IDataFilter, SqlsugarDataFilter>();
|
||||
var ss= Appsettings.appConfiguration("DbConnOptions", "EnabledCodeFirst");
|
||||
services.Configure<DbConnOptions>(Appsettings.appConfiguration("DbConnOptions"));
|
||||
services.AddSqlsugarServer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user