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

42 lines
1.1 KiB

using Easy.Extensions;
using Easy.Options;
using Identity.Api.Infrastructure;
namespace Identity.Api;
public static class ProgramExtension
{
public static WebApplication ConfigureServices(this WebApplicationBuilder builder)
{
builder.AddCustomDbContext();
builder.AddCustomAuthentication(builder.Configuration["authorityUrl"]);
builder.Services.AddDynamicWebApi();
builder.Services.AddDependency();
builder.Services.AddUow();
builder.Services.AddPermissionManagement();
builder.Services.AddRepositories();
builder.Services.AddDomainServices();
builder.Services.AddApiResultProxy();
builder.Services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
builder.Services.AddSwaggerGen();
builder.Services.AddHttpContextAccessor();
return builder.Build();
}
public static WebApplication ConfigurePipeline(this WebApplication app)
{
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.MapControllers();
return app;
}
}