diff --git a/SurveyLib.Infrastructure.EFCore/Integration/DBType.cs b/SurveyLib.Infrastructure.EFCore/Integration/DBType.cs deleted file mode 100644 index f498c86..0000000 --- a/SurveyLib.Infrastructure.EFCore/Integration/DBType.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace SurveyLib.Infrastructure.EFCore.Integration; - -public enum DBType -{ - Sqlite, - PostgreSql -} \ No newline at end of file diff --git a/SurveyLib.Infrastructure.EFCore/Integration/InfrastructureExtensions.cs b/SurveyLib.Infrastructure.EFCore/Integration/InfrastructureExtensions.cs deleted file mode 100644 index 4735df6..0000000 --- a/SurveyLib.Infrastructure.EFCore/Integration/InfrastructureExtensions.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using SurveyLib.Core.Repositories; -using SurveyLib.Infrastructure.EFCore.Data; -using SurveyLib.Infrastructure.EFCore.Repositories; - -namespace SurveyLib.Infrastructure.EFCore.Integration; - -public static class InfrastructureExtensions -{ - public static IServiceCollection AddSurveyInfrastructure(this IServiceCollection services, string connectionString, - DBType dbType) - { - switch (dbType) - { - case DBType.Sqlite: - services.AddDbContext(options => options.UseSqlite(connectionString)); - break; - case DBType.PostgreSql: - services.AddDbContext(options => options.UseNpgsql(connectionString)); - break; - default: - throw new ArgumentOutOfRangeException(nameof(dbType), dbType, null); - } - - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - services.AddScoped(); - - return services; - } -} \ No newline at end of file