using AB.Domain.Repositories; using AB.Persistence; using AB.Persistence.Repos; using AB.Services; using AB.Services.Abstractions; using Microsoft.EntityFrameworkCore; using Microsoft.OpenApi.Models; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddControllers().AddApplicationPart(typeof(AB.API.AssemblyReference).Assembly); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(c => c.SwaggerDoc("v1", new OpenApiInfo { Title = "AB-API", Version = "v1", Description = "An Api for the AB-Application" })); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddDbContextPool(builder => { builder.UseInMemoryDatabase("test"); }); 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();