2023-04-12 22:30:42 +08:00
|
|
|
|
using Furion;
|
2023-05-24 12:29:20 +08:00
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
2023-04-12 22:30:42 +08:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
2023-05-22 12:57:27 +08:00
|
|
|
|
using Newtonsoft.Json.Schema;
|
2023-05-24 12:29:20 +08:00
|
|
|
|
using Yi.Framework.Infrastructure.Data;
|
|
|
|
|
|
using Yi.Framework.Infrastructure.Data.DataSeeds;
|
2023-05-21 21:43:11 +08:00
|
|
|
|
using Yi.Framework.Infrastructure.Sqlsugar;
|
2023-04-12 22:30:42 +08:00
|
|
|
|
|
2023-04-15 17:33:42 +08:00
|
|
|
|
namespace Yi.Furion.Sqlsugar.Core;
|
2023-04-12 22:30:42 +08:00
|
|
|
|
|
|
|
|
|
|
public class Startup : AppStartup
|
|
|
|
|
|
{
|
|
|
|
|
|
public void ConfigureServices(IServiceCollection services)
|
|
|
|
|
|
{
|
2023-05-21 21:43:11 +08:00
|
|
|
|
services.AddDbSqlsugarContextServer<YiDbContext>();
|
2023-04-12 22:30:42 +08:00
|
|
|
|
}
|
2023-05-24 12:29:20 +08:00
|
|
|
|
public async void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
|
|
|
|
|
{
|
|
|
|
|
|
app.UseDataFiterServer();
|
|
|
|
|
|
app.UseSqlsugarCodeFirstServer();
|
|
|
|
|
|
await app.UseDataSeedServer();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-04-12 22:30:42 +08:00
|
|
|
|
}
|