using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.DependencyInjection; namespace LexWells.Infrastructure.EntityFramework; public static class DataDependencyInjection { public static IServiceCollection AddLexWellsDatabase( this IServiceCollection services, string connectionString) where TContext : DbContext { services.AddDbContext(options => { options.UseSqlite(connectionString, sqliteOptions => { sqliteOptions.MigrationsAssembly(typeof(TContext).Assembly.FullName); }); }); return services; } }