using Application.Interfaces.Repositories; using Infrastructure.Database; using Infrastructure.Repositories; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; namespace Infrastructure; public static class DependencyInjection { public static IServiceCollection AddInfrastructure(this IServiceCollection services) { return services.AddDbContextFactory(options => options .UseInMemoryDatabase("Skibibase") .UseSeeding((c, _) => DbSeeder.Seed(c)) .UseAsyncSeeding((async (context, _, token) => await DbSeeder.SeedAsync(context, token))) .EnableSensitiveDataLogging() ) .AddScoped() .AddScoped(); } }