fixed VisaApplicationConfiguration.cs and changed DbContext registration
This commit is contained in:
@@ -27,7 +27,7 @@ public static class DependencyInjection
|
||||
{
|
||||
var databaseName = isDevelopment ? "developmentDB" : "normal'naya database";
|
||||
|
||||
services.AddDbContextFactory<DbContext>(opts =>
|
||||
services.AddDbContext<DbContext>(opts =>
|
||||
opts.UseSqlServer(configurationManager.GetConnectionString(databaseName)));
|
||||
|
||||
services.AddScoped<IGenericReader>(serviceProvider => serviceProvider.GetRequiredService<DbContext>());
|
||||
|
||||
Reference in New Issue
Block a user