private void InitializeDbContext(IServiceProvider serviceProvider)
        {
            if (dataContext == null)
            {
                dataContext = serviceProvider.GetService <DummyDbContext>();

                activitiesRepository = new ActivitiesRepository(dataContext);
                professorRepository  = new ProfessorRepository(dataContext);
                studentRepository    = new StudentRepository(dataContext);
            }
        }
 public ProfessorRepository(DummyDbContext context)
 {
     dataContext = context;
 }
Beispiel #3
0
 public ActivitiesRepository(DummyDbContext context)
 {
     dataContext = context;
 }
Beispiel #4
0
 public StudentRepository(DummyDbContext context)
 {
     dataContext = context;
 }