好的,已经修复完成
This commit is contained in:
@@ -19,7 +19,7 @@ namespace Yi.Framework.Core.Sqlsugar.Extensions
|
|||||||
var db = app.ApplicationServices.GetRequiredService<ISqlSugarClient>();
|
var db = app.ApplicationServices.GetRequiredService<ISqlSugarClient>();
|
||||||
var options = app.ApplicationServices.GetRequiredService<IOptions<DbConnOptions>>();
|
var options = app.ApplicationServices.GetRequiredService<IOptions<DbConnOptions>>();
|
||||||
|
|
||||||
//if (options.Value.EnabledCodeFirst == false) return;
|
if (options.Value.EnabledCodeFirst == false) return;
|
||||||
|
|
||||||
var assemblys = new List<Assembly>();
|
var assemblys = new List<Assembly>();
|
||||||
|
|
||||||
|
|||||||
@@ -22,22 +22,22 @@ namespace Yi.Framework.Core.Sqlsugar.Options
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 开启种子数据
|
/// 开启种子数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool EnabledDbSeed = false;
|
public bool EnabledDbSeed { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 开启读写分离
|
/// 开启读写分离
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool EnabledReadWrite = false;
|
public bool EnabledReadWrite { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 开启codefirst
|
/// 开启codefirst
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool EnabledCodeFirst = false;
|
public bool EnabledCodeFirst { get; set; }=false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 实体程序集
|
/// 实体程序集
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<string>? EntityAssembly;
|
public List<string>? EntityAssembly { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 读写分离
|
/// 读写分离
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ namespace Yi.Framework.Core.Sqlsugar
|
|||||||
|
|
||||||
//这里替换过滤器实现
|
//这里替换过滤器实现
|
||||||
services.AddScoped<IDataFilter, SqlsugarDataFilter>();
|
services.AddScoped<IDataFilter, SqlsugarDataFilter>();
|
||||||
var ss= Appsettings.appConfiguration("DbConnOptions", "EnabledCodeFirst");
|
|
||||||
services.Configure<DbConnOptions>(Appsettings.appConfiguration("DbConnOptions"));
|
services.Configure<DbConnOptions>(Appsettings.appConfiguration("DbConnOptions"));
|
||||||
services.AddSqlsugarServer();
|
services.AddSqlsugarServer();
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ using Yi.Framework.Web;
|
|||||||
|
|
||||||
TimeTest.Start();
|
TimeTest.Start();
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>url
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>url
|
||||||
builder.WebHost.UseStartUrlsServer(builder.Configuration);
|
builder.WebHost.UseStartUrlsServer(builder.Configuration);
|
||||||
|
|
||||||
|
|||||||
@@ -83,3 +83,4 @@
|
|||||||
2023:01:21-22:21:52本次运行启动时间为:1563毫秒
|
2023:01:21-22:21:52本次运行启动时间为:1563毫秒
|
||||||
2023:01:21-22:29:30本次运行启动时间为:9099毫秒
|
2023:01:21-22:29:30本次运行启动时间为:9099毫秒
|
||||||
2023:01:21-22:30:38本次运行启动时间为:2136毫秒
|
2023:01:21-22:30:38本次运行启动时间为:2136毫秒
|
||||||
|
2023:01:21-23:15:24本次运行启动时间为:1944毫秒
|
||||||
|
|||||||
Reference in New Issue
Block a user