initial commit

This commit is contained in:
Yui
2025-11-26 16:50:06 -03:00
commit 5644aa0ebf
47 changed files with 800 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
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<AppDbContext>(options =>
options
.UseInMemoryDatabase("Skibibase")
.UseSeeding((c, _) => DbSeeder.Seed(c))
.UseAsyncSeeding((async (context, _, token) => await DbSeeder.SeedAsync(context, token)))
.EnableSensitiveDataLogging()
)
.AddScoped<IUserRepository, UserRepository>()
.AddScoped<IKillRepository, KillRepository>();
}
}