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.
 
 
 
 
 

52 lines
1.4 KiB

using Easy.Extensions;
using Easy.Options;
using IdentityServer.Realization;
namespace IdentityServer;
public static class ProgramExtension
{
public static WebApplication ConfigureServices(this WebApplicationBuilder builder)
{
builder.AddCustomDbContext();
builder.AddCustomIdentityServer();
builder.Services.AddDynamicWebApi();
builder.Services.AddDependency();
builder.Services.AddUow();
builder.Services.AddRepositories();
builder.Services.AddDomainServices();
builder.Services.AddApiResultProxy();
builder.Services.AddPermissionManagement();
builder.Services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
builder.Services.AddMasaBlazor();
builder.Services.AddSwaggerGen();
builder.Services.AddHttpContextAccessor();
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
return builder.Build();
}
public static WebApplication ConfigurePipeline(this WebApplication app)
{
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseIdentityServer();
app.MapControllers();
app.UseStaticFiles();
app.UseRouting();
app.MapBlazorHub();
app.MapFallbackToPage("/_Host");
return app;
}
}