예제 #1
0
 public SubjectController(IHttpContextAccessor httpContextAccessor, IRepositoryFacade repositoryFacade)
 {
     this.repositoryFacade = repositoryFacade;
     groupRepository       = this.repositoryFacade.CreateGenericRepository <Group>();
     subjectRepository     = this.repositoryFacade.CreateGenericRepository <Subject>();
     GroupSubjectMappingModelRepository      = this.repositoryFacade.CreateGenericRepository <GroupSubjectMappingModel>();
     TeacherSubjectMappingModelRepository    = this.repositoryFacade.CreateEagerGenericRepository <TeacherSubjectMappingModel>() as IEagerGenericRepository <TeacherSubjectMappingModel>;
     eagerGroupSubjectMappingModelRepository = this.repositoryFacade.CreateEagerGenericRepository <GroupSubjectMappingModel>() as IEagerGenericRepository <GroupSubjectMappingModel>;
     this.userId = httpContextAccessor.HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
 }
예제 #2
0
 public MagazineController(IRepositoryFacade repositoryFacade, IHttpContextAccessor httpContextAccessor, MagazineContext magazineContext)
 {
     this.repositoryFacade   = repositoryFacade;
     magazineRepository      = this.repositoryFacade.CreateEagerGenericRepository <Magazine>();
     magazineRepositoryEager = this.repositoryFacade.CreateEagerGenericRepository <Magazine>() as IEagerGenericRepository <Magazine>;
     subjectRepository       = this.repositoryFacade.CreateGenericRepository <Subject>();
     groupRepository         = this.repositoryFacade.CreateEagerGenericRepository <Group>() as IEagerGenericRepository <Group>;
     recordsRepository       = this.repositoryFacade.CreateGenericRepository <Record>();
     this.userId             = httpContextAccessor.HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
     this.magazineContext    = magazineContext;
     commentRepository       = this.repositoryFacade.CreateGenericRepository <Comment>();
     studentRepository       = this.repositoryFacade.CreateGenericRepository <Student>();
 }
예제 #3
0
 public AttestationController(IHttpContextAccessor httpContextAccessor, IRepositoryFacade repositoryFacade, MagazineContext magazineContext)
 {
     this.userId = httpContextAccessor.HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value;
     this.attestationRepository  = repositoryFacade.CreateGenericRepository <Attestation>();
     eagerGroupRepository        = repositoryFacade.CreateEagerGenericRepository <Group>() as IEagerGenericRepository <Group>;
     eagerAttestationRepository  = repositoryFacade.CreateEagerGenericRepository <Attestation>() as IEagerGenericRepository <Attestation>;
     groupRepository             = repositoryFacade.CreateGenericRepository <Group>();
     markRepository              = repositoryFacade.CreateGenericRepository <Mark>();
     subjectRepository           = repositoryFacade.CreateGenericRepository <Subject>();
     groupSubjetcRepository      = repositoryFacade.CreateEagerGenericRepository <GroupSubjectMappingModel>() as IEagerGenericRepository <GroupSubjectMappingModel>;
     groupTeacherRepository      = repositoryFacade.CreateGenericRepository <GroupTeacherMappingModel>();
     studentRepository           = repositoryFacade.CreateGenericRepository <Student>();
     attestationRecordRepository = repositoryFacade.CreateGenericRepository <AttestationRecord>();
     eagerMarkRepository         = repositoryFacade.CreateEagerGenericRepository <Mark>() as IEagerGenericRepository <Mark>;
     this.magazineContext        = magazineContext;
 }