private readonly LectureDBContext _context; // all repositories will use the same instace of context public UnitOfWork(LectureDBContext context, IStudentRepository studentRepository) // dependency injection { _context = context; StudentRepository = studentRepository; }
public StudentRepository(LectureDBContext context) : base(context) { }
public GenericRepository(LectureDBContext context) { _context = context; }
public LessonRepository(LectureDBContext context) : base(context) { }