feat:更新模块关系
This commit is contained in:
@@ -21,6 +21,7 @@ namespace Yi.Framework.Core.Sqlsugar.Extensions
|
|||||||
|
|
||||||
if (options.Value.EnabledCodeFirst == false) return;
|
if (options.Value.EnabledCodeFirst == false) return;
|
||||||
|
|
||||||
|
db.DbMaintenance.CreateDatabase();
|
||||||
var assemblys = new List<Assembly>();
|
var assemblys = new List<Assembly>();
|
||||||
|
|
||||||
//全盘加载
|
//全盘加载
|
||||||
@@ -46,7 +47,6 @@ namespace Yi.Framework.Core.Sqlsugar.Extensions
|
|||||||
|
|
||||||
private static void TableInvoer(ISqlSugarClient _Db, List<Type> typeList)
|
private static void TableInvoer(ISqlSugarClient _Db, List<Type> typeList)
|
||||||
{
|
{
|
||||||
_Db.DbMaintenance.CreateDatabase();
|
|
||||||
foreach (var t in typeList)
|
foreach (var t in typeList)
|
||||||
{
|
{
|
||||||
//扫描如果存在SugarTable特性 并且 不是分表模型,直接codefirst
|
//扫描如果存在SugarTable特性 并且 不是分表模型,直接codefirst
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Yi.Framework.Data.Extensions
|
|||||||
{
|
{
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
var dataSeeds = builder.ApplicationServices.GetServices<IDataSeed>();
|
var dataSeeds = builder.ApplicationServices.GetServices<IDataSeed>();
|
||||||
var iUnitOfWorkManager = builder.ApplicationServices.GetRequiredService<IUnitOfWorkManager>();
|
var iUnitOfWorkManager = builder.ApplicationServices.GetRequiredService<IUnitOfWorkManager>();
|
||||||
if (dataSeeds is not null)
|
if (dataSeeds is not null)
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ namespace Yi.Framework.Data
|
|||||||
{
|
{
|
||||||
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//使用了过滤器
|
//使用了过滤器
|
||||||
app.UseDataFiterServer();
|
app.UseDataFiterServer();
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ using Yi.BBS.Domain.Shared;
|
|||||||
namespace Yi.BBS.Domain
|
namespace Yi.BBS.Domain
|
||||||
{
|
{
|
||||||
[DependsOn(
|
[DependsOn(
|
||||||
typeof(YiBBSDomainSharedModule),
|
typeof(YiBBSDomainSharedModule)
|
||||||
typeof(YiFrameworkDataModule)
|
|
||||||
)]
|
)]
|
||||||
public class YiBBSDomainModule : IStartupModule
|
public class YiBBSDomainModule : IStartupModule
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ builder.Host.ConfigureAutoFacContainer(container =>
|
|||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
var db = app.Services.GetService<ISqlSugarClient>();
|
var db = app.Services.GetService<ISqlSugarClient>();
|
||||||
db.DbMaintenance.CreateDatabase();
|
|
||||||
app.UseErrorHandlingServer();
|
app.UseErrorHandlingServer();
|
||||||
|
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
|
|||||||
@@ -19,10 +19,9 @@ namespace Yi.BBS.Web
|
|||||||
{
|
{
|
||||||
[DependsOn(
|
[DependsOn(
|
||||||
typeof(YiBBSSqlsugarModule),
|
typeof(YiBBSSqlsugarModule),
|
||||||
typeof(YiFrameworkAspNetCoreModule),
|
typeof(YiFrameworkAspNetCoreModule),
|
||||||
typeof(YiFrameworkCoreAutofacModule),
|
typeof(YiFrameworkCoreAutofacModule),
|
||||||
typeof(YiBBSApplicationModule),
|
typeof(YiBBSApplicationModule)
|
||||||
typeof(YiBBSSqlsugarModule)
|
|
||||||
)]
|
)]
|
||||||
public class YiBBSWebModule : IStartupModule
|
public class YiBBSWebModule : IStartupModule
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ using Yi.BBS.Domain.Shared;
|
|||||||
namespace Yi.BBS.Domain
|
namespace Yi.BBS.Domain
|
||||||
{
|
{
|
||||||
[DependsOn(
|
[DependsOn(
|
||||||
typeof(YiBBSDomainSharedModule),
|
typeof(YiBBSDomainSharedModule)
|
||||||
typeof(YiFrameworkDataModule)
|
|
||||||
)]
|
)]
|
||||||
public class YiBBSDomainModule : IStartupModule
|
public class YiBBSDomainModule : IStartupModule
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ builder.Host.ConfigureAutoFacContainer(container =>
|
|||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
var db = app.Services.GetService<ISqlSugarClient>();
|
var db = app.Services.GetService<ISqlSugarClient>();
|
||||||
db.DbMaintenance.CreateDatabase();
|
|
||||||
app.UseErrorHandlingServer();
|
app.UseErrorHandlingServer();
|
||||||
|
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
|
|||||||
@@ -19,10 +19,9 @@ namespace Yi.BBS.Web
|
|||||||
{
|
{
|
||||||
[DependsOn(
|
[DependsOn(
|
||||||
typeof(YiBBSSqlsugarModule),
|
typeof(YiBBSSqlsugarModule),
|
||||||
typeof(YiFrameworkAspNetCoreModule),
|
typeof(YiFrameworkAspNetCoreModule),
|
||||||
typeof(YiFrameworkCoreAutofacModule),
|
typeof(YiFrameworkCoreAutofacModule),
|
||||||
typeof(YiBBSApplicationModule),
|
typeof(YiBBSApplicationModule)
|
||||||
typeof(YiBBSSqlsugarModule)
|
|
||||||
)]
|
)]
|
||||||
public class YiBBSWebModule : IStartupModule
|
public class YiBBSWebModule : IStartupModule
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user