好的,已经修复完成

This commit is contained in:
橙子
2023-01-21 23:15:43 +08:00
parent e23e5a292d
commit f4124db320
5 changed files with 6 additions and 7 deletions

View File

@@ -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>();

View File

@@ -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>
/// 读写分离

View File

@@ -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();