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