好的,已经修复完成

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

View File

@@ -6,7 +6,6 @@ using Yi.Framework.Web;
TimeTest.Start();
var builder = WebApplication.CreateBuilder(args);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>url
builder.WebHost.UseStartUrlsServer(builder.Configuration);

View File

@@ -83,3 +83,4 @@
2023:01:21-22:21:52本次运行启动时间为1563毫秒
2023:01:21-22:29:30本次运行启动时间为9099毫秒
2023:01:21-22:30:38本次运行启动时间为2136毫秒
2023:01:21-23:15:24本次运行启动时间为1944毫秒