init 项目代码初始化

This commit is contained in:
2023-12-25 11:01:55 +08:00
parent 15112c0ddd
commit da09dd9f0f
112 changed files with 4114 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using Kurisu.AspNetCore;
using Kurisu.AspNetCore.Startup;
using Kurisu.SqlSugar.Extensions;
using SqlSugar;
namespace Dlhis.Canteen;
public class SqlSugarPack : BaseAppPack
{
public override bool IsBeforeUseRouting { get; }
public override void ConfigureServices(IServiceCollection services)
{
services.AddSqlSugar();
}
public override void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
//using var scope = app.ApplicationServices.CreateScope();
//var db = scope.ServiceProvider.GetService<ISqlSugarClient>();
//var tables = App.ActiveTyps.Where(x => x.IsDefined(typeof(SugarTable), false)).ToArray();
//db.DbMaintenance.CreateDatabase();
//db.CodeFirst.InitTables(tables);
}
}