using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Swagger; namespace ContactsApp; public class Program { public static void Main(string[] args) { var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddControllers(); builder.Services.AddAuthorization(); builder.Services.AddSwaggerGen(); builder.Services.AddSingleton(); var app = builder.Build(); // Configure the HTTP request pipeline. // Запрос -> Компу -> По порту -> Приложение -> Kestrel -> (HttpContext) Middlewares -> Controller (mapping) -> AfterMethod -> Method -> BeforeMethod app.UseAuthorization(); app.UseSwagger(); app.UseSwaggerUI(); app.MapControllers(); app.Run(); } }