2023-01-14 18:16:16 +08:00
|
|
|
|
using Yi.Framework.Application;
|
|
|
|
|
|
using Yi.Framework.Application.Contracts;
|
|
|
|
|
|
using Yi.Framework.Core;
|
2023-01-16 20:55:36 +08:00
|
|
|
|
using Yi.Framework.Core.Autofac.Extensions;
|
|
|
|
|
|
using Yi.Framework.Core.Autofac.Modules;
|
2023-01-14 18:16:16 +08:00
|
|
|
|
using Yi.Framework.Core.AutoMapper;
|
|
|
|
|
|
using Yi.Framework.Core.Extensions;
|
|
|
|
|
|
using Yi.Framework.Core.Sqlsugar;
|
|
|
|
|
|
using Yi.Framework.Ddd;
|
|
|
|
|
|
using Yi.Framework.Domain;
|
|
|
|
|
|
using Yi.Framework.Domain.Shared;
|
|
|
|
|
|
using Yi.Framework.Sqlsugar;
|
2023-01-11 15:05:31 +08:00
|
|
|
|
using Yi.Framework.Web;
|
2023-01-11 11:10:59 +08:00
|
|
|
|
|
2023-01-16 21:10:00 +08:00
|
|
|
|
TimeTest.Start();
|
2023-01-11 11:10:59 +08:00
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
2023-01-14 18:16:16 +08:00
|
|
|
|
builder.WebHost.UseUrls(builder.Configuration.GetValue<string>("StartUrl"));
|
|
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
|
|
|
|
|
|
builder.UseYiModules(
|
|
|
|
|
|
typeof(YiFrameworkCoreModule).Assembly,
|
|
|
|
|
|
typeof(YiFrameworkCoreAutoMapperModule).Assembly,
|
|
|
|
|
|
typeof(YiFrameworkDddModule).Assembly,
|
|
|
|
|
|
typeof(YiFrameworkCoreSqlsugarModule).Assembly,
|
|
|
|
|
|
|
|
|
|
|
|
typeof(YiFrameworkSqlsugarModule).Assembly,
|
|
|
|
|
|
typeof(YiFrameworkDomainSharedModule).Assembly,
|
|
|
|
|
|
typeof(YiFrameworkDomainModule).Assembly,
|
|
|
|
|
|
typeof(YiFrameworkApplicationContractsModule).Assembly,
|
2023-01-14 18:46:34 +08:00
|
|
|
|
typeof(YiFrameworkApplicationModule).Assembly,
|
|
|
|
|
|
typeof(YiFrameworkWebModule).Assembly
|
2023-01-16 20:55:36 +08:00
|
|
|
|
|
2023-01-14 18:16:16 +08:00
|
|
|
|
);
|
|
|
|
|
|
|
2023-01-16 20:55:36 +08:00
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>autofacģ<63><C4A3>,<2C><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>
|
|
|
|
|
|
builder.Host.ConfigureAutoFacContainer(container =>
|
|
|
|
|
|
{
|
|
|
|
|
|
container.RegisterYiModule(AutoFacModuleEnum.PropertiesAutowiredModule, typeof(YiFrameworkWebModule).Assembly);
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2023-01-14 18:16:16 +08:00
|
|
|
|
|
2023-01-11 11:10:59 +08:00
|
|
|
|
var app = builder.Build();
|
2023-01-16 20:55:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var t = app.Services.GetService<Test2Entity>();
|
2023-01-14 18:16:16 +08:00
|
|
|
|
app.MapControllers();
|
2023-01-16 21:10:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-14 18:16:16 +08:00
|
|
|
|
app.Run();
|