Example #1
0
        public UnitOfWork(DataContext dataContext)
        {
            this.dataContext = dataContext;

            Activities = new ActivityRepository(this.dataContext);
            Alumnuses  = new AlumnusRepository(this.dataContext);
            Employees  = new EmployeeRepository(this.dataContext);
            SendLists  = new SendListRepository(this.dataContext);
        }
Example #2
0
 public UnitOfWork(LibarysystemDBcontext libarysystemDBcontext)
 {
     _context   = libarysystemDBcontext;
     activities = new ActivitiesRepository(_context);
     alumnus    = new AlumnusRepository(_context);
     program    = new ProgramRepository(_context);
     section    = new SectionRepository(_context);
     employee   = new EmployeeRepository(_context);
     person     = new PersonRepository(_context);
 }