using ElectronicsShopBusinessLogic.BusinessLogic; using ElectronicsShopContracts.BusinessLogicContracts; using ElectronicsShopContracts.StorageContracts; using ElectronicsShopDataBaseImplement.Implements; using Microsoft.OpenApi.Models; var builder = WebApplication.CreateBuilder(args); //todo logger!!! // Add services to the container. builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(x => x.SwaggerDoc("v1", new OpenApiInfo { Title = "ElectronicsShopRestAPI", Version = "v1" })); var app = builder.Build(); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(x => x.SwaggerEndpoint("/swagger/v1/swagger.json", "ElectronicsShopRestAPI v1")); } app.UseHttpsRedirection(); app.UseAuthorization(); app.MapControllers(); app.Run();