diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Extensions/SqlsugarCodeFirstExtensions.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Extensions/SqlsugarCodeFirstExtensions.cs index 8c98fee9..ec1f5888 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Extensions/SqlsugarCodeFirstExtensions.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Extensions/SqlsugarCodeFirstExtensions.cs @@ -19,7 +19,7 @@ namespace Yi.Framework.Core.Sqlsugar.Extensions var db = app.ApplicationServices.GetRequiredService(); var options = app.ApplicationServices.GetRequiredService>(); - //if (options.Value.EnabledCodeFirst == false) return; + if (options.Value.EnabledCodeFirst == false) return; var assemblys = new List(); diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Options/DbConnOptions.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Options/DbConnOptions.cs index f5ed700b..22a6fcd3 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Options/DbConnOptions.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/Options/DbConnOptions.cs @@ -22,22 +22,22 @@ namespace Yi.Framework.Core.Sqlsugar.Options /// /// 开启种子数据 /// - public bool EnabledDbSeed = false; + public bool EnabledDbSeed { get; set; } = false; /// /// 开启读写分离 /// - public bool EnabledReadWrite = false; + public bool EnabledReadWrite { get; set; } = false; /// /// 开启codefirst /// - public bool EnabledCodeFirst = false; + public bool EnabledCodeFirst { get; set; }=false; /// /// 实体程序集 /// - public List? EntityAssembly; + public List? EntityAssembly { get; set; } /// /// 读写分离 diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/YiFrameworkCoreSqlsugarModule.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/YiFrameworkCoreSqlsugarModule.cs index e13674bb..5349b2b2 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/YiFrameworkCoreSqlsugarModule.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Core.Sqlsugar/YiFrameworkCoreSqlsugarModule.cs @@ -29,7 +29,6 @@ namespace Yi.Framework.Core.Sqlsugar //这里替换过滤器实现 services.AddScoped(); - var ss= Appsettings.appConfiguration("DbConnOptions", "EnabledCodeFirst"); services.Configure(Appsettings.appConfiguration("DbConnOptions")); services.AddSqlsugarServer(); diff --git a/Yi.Framework.Net6/src/project/Yi.Framework.Web/Program.cs b/Yi.Framework.Net6/src/project/Yi.Framework.Web/Program.cs index 366cf1b2..007f2f28 100644 --- a/Yi.Framework.Net6/src/project/Yi.Framework.Web/Program.cs +++ b/Yi.Framework.Net6/src/project/Yi.Framework.Web/Program.cs @@ -6,7 +6,6 @@ using Yi.Framework.Web; TimeTest.Start(); var builder = WebApplication.CreateBuilder(args); - //url builder.WebHost.UseStartUrlsServer(builder.Configuration); diff --git a/Yi.Framework.Net6/src/project/Yi.Framework.Web/TimeTest.txt b/Yi.Framework.Net6/src/project/Yi.Framework.Web/TimeTest.txt index 3cbeb894..a0295bb9 100644 --- a/Yi.Framework.Net6/src/project/Yi.Framework.Web/TimeTest.txt +++ b/Yi.Framework.Net6/src/project/Yi.Framework.Web/TimeTest.txt @@ -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毫秒