using ComputerHardwareStoreBusinessLogic.BusinessLogic; using ComputerHardwareStoreContracts.BusinessLogicsContracts; using ComputerHardwareStoreContracts.StorageContracts; using ComputerHardwareStoreDatabaseImplement; using ComputerHardwareStoreDatabaseImplement.Implements; using ComputerHardwareStoreREST; using Microsoft.EntityFrameworkCore; using Microsoft.OpenApi.Models; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Logging.SetMinimumLevel(LogLevel.Trace); builder.Services.AddControllers(); // получаем строку подключения из файла конфигурации //DBSetting.ConectionString = builder.Configuration.GetConnectionString("DefaultConnection"); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); //builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); var app = builder.Build(); // Configure the HTTP request pipeline. if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(); } app.UseHttpsRedirection(); app.UseAuthorization(); app.MapControllers(); app.Run();