예제 #1
0
 public UnitOfWork()
 {
     context   = new UnivrsityContext();
     groupRep  = new GenericRepository <Group>(context);
     subjRep   = new GenericRepository <Subject>(context);
     studRep   = new GenericRepository <Student>(context);
     grsubjRep = new GroupSubjectRepository(context);
     userRep   = new GenericRepository <User>(context);
     roleRep   = new GenericRepository <Role>(context);
 }
 public GenericRepository(UnivrsityContext context)
 {
     this.context = context;
     this.dbSet   = context.Set <TEntity>();
 }
 public GroupSubjectRepository(UnivrsityContext context)
 {
     this.context = context;
 }