public UnitOfWork(ApplicationDbContext context)
 {
     this._context = context;
     Programmes = new ProgrammeRepository(context);
     UsefulLinks = new UsefulLinkRepository(context);
     NewsArticles = new NewsArticleRepository(context);
     Gallerys = new GalleryRepository(context);
 }
 public UnitOfWork(ApplicationDbContext context)
 {
     this._context = context;
     Programmes    = new ProgrammeRepository(context);
     UsefulLinks   = new UsefulLinkRepository(context);
     NewsArticles  = new NewsArticleRepository(context);
     Gallerys      = new GalleryRepository(context);
 }
Example #3
0
 public ProgrammeController(ProgrammeRepository pr, FacultyRepository fr)
 {
     _pr = pr;
     _fr = fr;
 }
Example #4
0
 public ProgrammeViewModel(ProgrammeRepository pr, Programme programme)
 {
     _pr        = pr;
     Programme  = programme;
     Programmes = _pr.GetAll().OrderBy(x => x.ProgrammeId);
 }
Example #5
0
 protected void AssumeProgrammeRepositoryExistsReturns(bool valueToReturn)
 {
     _ = ProgrammeRepository.Setup(a => a.Exists(It.IsAny <Expression <Func <Programme, bool> > >())).Returns(valueToReturn);
 }