You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
980 B
C#

2 years ago
using Autofac;
using Autofac.Extensions.DependencyInjection;
using DS.Module.AutofacModule;
using DS.Module.Core.Modules;
using DS.Module.SqlSugar;
using DS.Module.User;
using DS.WMS.Core.DBSeed;
using DS.WMS.WebApi;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
//Autofac注入
builder.Host
.UseServiceProviderFactory(new AutofacServiceProviderFactory())
.ConfigureContainer<ContainerBuilder>(builder =>
{
builder.RegisterModule(new AutofacModuleRegister());
});
builder.Services.AddControllers();
builder.Services.AddApplication<DSAppWebModule>();
// .AddApplication<SqlSugarModule>()
// .AddApplication<DBSeedModule>()
// .AddApplication<UserModule>();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
// builder.Services.AddEndpointsApiExplorer();
// builder.Services.AddSwaggerGen();
var app = builder.Build();
//
app.InitializeApplication();
app.Run();