using DinerContracts.BusinessLogicsContacts; using DinerContracts.BusinessLogicsContracts; using DinerContracts.StoragesContracts; using DinerDataBaseImplement.Implements; using DineryBusinessLogic.BusinessLogic; using DocumentFormat.OpenXml.VariantTypes; using Microsoft.OpenApi.Models; namespace DinerRestAPI { public class Program { public static void Main(string[] args) { var builder = WebApplication.CreateBuilder(args); builder.Logging.SetMinimumLevel(LogLevel.Trace); builder.Logging.AddLog4Net("log4net.config"); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); builder.Services.AddTransient(); // Add services to the container. 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 = "DinerRestApi", Version = "v1" })); var app = builder.Build(); // Configure the HTTP request pipeline. if(app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "DinerRestApi v1")); } app.UseHttpsRedirection(); app.UseAuthorization(); app.MapControllers(); app.Run(); } } }