forked from amkovkov/GranuSightSoftware2
fix: GSS2.Core.DependencyInjectionHelper after database reforge
This commit is contained in:
@@ -108,20 +108,11 @@ public static class DependencyInjectionHelper
|
||||
}
|
||||
);
|
||||
|
||||
public static IServiceCollection AddAmineContentCalibrationContext(this IServiceCollection services, IConfigurationManager configuration) => services
|
||||
.AddDbContext<CalibrationContext>(
|
||||
public static IServiceCollection AddAmineContentContext(this IServiceCollection services, IConfigurationManager configuration) => services
|
||||
.AddDbContext<Context>(
|
||||
options =>
|
||||
{
|
||||
var databasePath = configuration.GetConnectionString("AmineContentCalibrationDatabasePath");
|
||||
options.UseSqlite($"Data Source={databasePath}");
|
||||
},
|
||||
ServiceLifetime.Singleton
|
||||
);
|
||||
public static IServiceCollection AddAmineContentResultsContext(this IServiceCollection services, IConfigurationManager configuration) => services
|
||||
.AddDbContext<ResultsContext>(
|
||||
options =>
|
||||
{
|
||||
var databasePath = configuration.GetConnectionString("AmineContentResultsDatabasePath");
|
||||
var databasePath = configuration.GetConnectionString("AmineContentDatabasePath");
|
||||
options.UseSqlite($"Data Source={databasePath}");
|
||||
},
|
||||
ServiceLifetime.Singleton
|
||||
|
||||
Reference in New Issue
Block a user