namespace Adapters.Driven.Persistence; using Adapters.Driven.Persistence.Context; using Adapters.Driven.Persistence.Repositories; using Adapters.Driven.Persistence.Services; using Application.Auth; using Domain.Ports.Repositories; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; public static class DependencyInjection { public static IServiceCollection AddPersistence( this IServiceCollection services, IConfiguration configuration) { services.AddDbContext(options => options.UseSqlServer( configuration.GetConnectionString("DefaultConnection"), b => b.MigrationsAssembly(typeof(AppDbContext).Assembly.FullName))); // Repositories services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); // Auth services services.AddScoped(); services.AddScoped(); return services; } }