Ejemplo n.º 1
0
 public UnitOfWork(
     ArmyTechTaskEntities context,
     GenaricReposoitories <Student> studentRepo,
     GenaricReposoitories <Field> fieldRepo,
     GenaricReposoitories <Governorate> governorateRepo,
     GenaricReposoitories <Neighborhood> neighborhoodRepo
     )
 {
     Context                  = context;
     StudentRepo              = studentRepo;
     StudentRepo.Context      = Context;
     FieldRepo                = fieldRepo;
     FieldRepo.Context        = Context;
     GovernorateRepo          = governorateRepo;
     GovernorateRepo.Context  = Context;
     NeighborhoodRepo         = neighborhoodRepo;
     neighborhoodRepo.Context = Context;
 }
 public GenaricReposoitories(ArmyTechTaskEntities context)
 {
     Context = context;
     db      = context.Set <T>();
 }