using DiningRoomBusinessLogic.BusinessLogic; using DiningRoomContracts.BusinessLogicContracts; using DiningRoomContracts.StorageContracts; using DiningRoomDatabaseImplement.Implements; using Microsoft.OpenApi.Models; var Builder = WebApplication.CreateBuilder(args); 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.AddControllers(); Builder.Services.AddEndpointsApiExplorer(); Builder.Services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new OpenApiInfo { Title = "DiningRoomRestApi", Version = "v1" }); }); var App = Builder.Build(); if (App.Environment.IsDevelopment()) { App.UseSwagger(); App.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "DiningRoomRestApi v1")); } App.UseHttpsRedirection(); App.UseAuthorization(); App.MapControllers(); App.Run();