using IM.InitCommon.Management; using IM.InitCommon; namespace ContactService.WebApi { public class Program { public static void Main(string[] args) { var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.ConfigureDbConfiguration(); //builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); builder.ConfigExtraServices(); builder.Services.AddAllGrpcServer(); var app = builder.Build(); if (app.ApplyMigrationsIfRequested(args)) return; // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(); } app.UseAppDefault(); app.MapManagementHealth(); app.MapControllers(); app.MapAllGrpcServer(); app.Run(); } } }