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; }
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>(); }
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; }