Use the configuration depending on the selected database provider #13
@ -22,16 +22,16 @@ public static class DependencyInjection
|
||||
|
||||
services.AddDbContext<UberDbContext>(DbConfig);
|
||||
|
||||
services.AddScoped<ICampusDbContext>(provider => provider.GetService<CampusDbContext>()!);
|
||||
services.AddScoped<IDisciplineDbContext>(provider => provider.GetService<DisciplineDbContext>()!);
|
||||
services.AddScoped<IFacultyDbContext>(provider => provider.GetService<FacultyDbContext>()!);
|
||||
services.AddScoped<IGroupDbContext>(provider => provider.GetService<GroupDbContext>()!);
|
||||
services.AddScoped<ILectureHallDbContext>(provider => provider.GetService<LectureHallDbContext>()!);
|
||||
services.AddScoped<ILessonAssociationDbContext>(provider => provider.GetService<LessonAssociationDbContext>()!);
|
||||
services.AddScoped<IProfessorDbContext>(provider => provider.GetService<ProfessorDbContext>()!);
|
||||
services.AddScoped<ILessonDbContext>(provider => provider.GetService<LessonDbContext>()!);
|
||||
services.AddScoped<ITypeOfOccupationDbContext>(provider => provider.GetService<TypeOfOccupationDbContext>()!);
|
||||
services.AddScoped<ISpecificWeekDbContext>(provider => provider.GetService<SpecificWeekDbContext>()!);
|
||||
services.AddScoped<ICampusDbContext>(provider => provider.GetRequiredService<CampusDbContext>());
|
||||
services.AddScoped<IDisciplineDbContext>(provider => provider.GetRequiredService<DisciplineDbContext>());
|
||||
services.AddScoped<IFacultyDbContext>(provider => provider.GetRequiredService<FacultyDbContext>());
|
||||
services.AddScoped<IGroupDbContext>(provider => provider.GetRequiredService<GroupDbContext>());
|
||||
services.AddScoped<ILectureHallDbContext>(provider => provider.GetRequiredService<LectureHallDbContext>());
|
||||
services.AddScoped<ILessonAssociationDbContext>(provider => provider.GetRequiredService<LessonAssociationDbContext>());
|
||||
services.AddScoped<IProfessorDbContext>(provider => provider.GetRequiredService<ProfessorDbContext>());
|
||||
services.AddScoped<ILessonDbContext>(provider => provider.GetRequiredService<LessonDbContext>());
|
||||
services.AddScoped<ITypeOfOccupationDbContext>(provider => provider.GetRequiredService<TypeOfOccupationDbContext>());
|
||||
services.AddScoped<ISpecificWeekDbContext>(provider => provider.GetRequiredService<SpecificWeekDbContext>());
|
||||
|
||||
return services;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user