Ejemplo n.º 1
0
        public HomeController(ICalendarBookingRepositoryMarker calendarRepositoryMarker,
                              IClassroomRepositoryMarker classroomRepositoryMarker,
                              IFreeDocumentRepositoryMarker freeDocumentRepositoryMarker,
                              IFreeDocumentStudentRepositoryMarker freeDocumentStudentRepositoryMarker,
                              IFreeVideoRepositoryMarker freeVideoRepositoryMarker,
                              IFreeVideoStudentRepositoryMarker freeVideoStudentRepositoryMarker,
                              IPaidDocuemtStudentRepositoryMarker paidDocuemtStudentRepositoryMarker,
                              IPaidDocumentRepositoryMarker paidDocumentRepositoryMarker,
                              IPaidVideoRepositoryMarker paidVideoRepositoryMarker,
                              IPaidVideoStudentRepositoryMarker paidVideoStudentRepositoryMarker,
                              IStudentRepositoryMarker studentRepositoryMarker,
                              IStudentTypeRepositoryMarker studentTypeRepositoryMarker,
                              ISubjectRepositoryMarker subjectRepositoryMarker,
                              ITeacherRepositoryMarker teacherRepositoryMarker,
                              IBookingTimeRepositoryMarker bookingTimeRepositoryMarker)
        {
            var unitOfWork = new TeachersAssistantUnitOfWork(calendarRepositoryMarker,
                                                             classroomRepositoryMarker,
                                                             freeDocumentRepositoryMarker,
                                                             freeDocumentStudentRepositoryMarker,
                                                             freeVideoRepositoryMarker,
                                                             freeVideoStudentRepositoryMarker,
                                                             paidDocuemtStudentRepositoryMarker,
                                                             paidDocumentRepositoryMarker,
                                                             paidVideoRepositoryMarker,
                                                             paidVideoStudentRepositoryMarker,
                                                             studentRepositoryMarker,
                                                             studentTypeRepositoryMarker,
                                                             subjectRepositoryMarker,
                                                             teacherRepositoryMarker,
                                                             bookingTimeRepositoryMarker);

            _teacherRepository = new TeachersAssistantRepositoryServices(unitOfWork);
            _teacherRepository.GetSubjectList();
        }
Ejemplo n.º 2
0
 public TeachersAssistantUnitOfWork(ICalendarBookingRepositoryMarker calendarBookingRepository,
                                    IClassroomRepositoryMarker classroomRepositoryMarker,
                                    IFreeDocumentRepositoryMarker freeDocumentRepositoryMarker,
                                    IFreeDocumentStudentRepositoryMarker freeDocumentStudentRepositoryMarker,
                                    IFreeVideoRepositoryMarker freeVideoRepositoryMarker,
                                    IFreeVideoStudentRepositoryMarker freeVideoStudentRepositoryMarker,
                                    IPaidDocuemtStudentRepositoryMarker paidDocuemtStudentRepositoryMarker,
                                    IPaidDocumentRepositoryMarker paidDocumentRepositoryMarker,
                                    IPaidVideoRepositoryMarker paidVideoRepositoryMarker,
                                    IPaidVideoStudentRepositoryMarker paidVideoStudentRepositoryMarker,
                                    IStudentRepositoryMarker studentRepositoryMarker,
                                    IStudentTypeRepositoryMarker studentTypeRepositoryMarker,
                                    ISubjectRepositoryMarker subjectRepositoryMarker,
                                    ITeacherRepositoryMarker teacherRepositoryMarker,
                                    IBookingTimeRepositoryMarker bookingTimeRepositoryMarker)
 {
     _calendarBookingRepository     = calendarBookingRepository as CalendarBookingRepository;
     _classroomRepository           = classroomRepositoryMarker as ClassroomRepository;
     _freeDocumentRepository        = freeDocumentRepositoryMarker as FreeDocumentRepository;
     _freeDocumentStudentRepository = freeDocumentStudentRepositoryMarker as FreeDocumentStudentRepository;
     _freeVideoRepository           = freeVideoRepositoryMarker as FreeVideoRepository;
     _freeVideoStudentRepository    = freeVideoStudentRepositoryMarker as FreeVideoStudentRepository;
     _paidDocuemtStudentRepository  = paidDocuemtStudentRepositoryMarker as PaidDocuemtStudentRepository;
     _paidDocumentRepository        = paidDocumentRepositoryMarker as PaidDocumentRepository;
     _paidVideoRepository           = paidVideoRepositoryMarker as PaidVideoRepository;
     _paidVideoStudentRepository    = paidVideoStudentRepositoryMarker as PaidVideoStudentRepository;
     _studentRepository             = studentRepositoryMarker as StudentRepository;
     _studentTypeRepository         = studentTypeRepositoryMarker as StudentTypeRepository;
     _subjectRepository             = subjectRepositoryMarker as SubjectRepository;
     _teacherRepository             = teacherRepositoryMarker as TeacherRepository;
     _bookingTimeRepository         = bookingTimeRepositoryMarker as BookingTimeRepository;
 }
Ejemplo n.º 3
0
        /* public HomeController()
         * {
         *
         * }*/
        public HomeController(ICalendarBookingRepositoryMarker calendarRepositoryMarker,
                              IClassroomRepositoryMarker classroomRepositoryMarker,
                              IFreeDocumentRepositoryMarker freeDocumentRepositoryMarker,
                              IFreeDocumentStudentRepositoryMarker freeDocumentStudentRepositoryMarker,
                              IFreeVideoRepositoryMarker freeVideoRepositoryMarker,
                              IFreeVideoStudentRepositoryMarker freeVideoStudentRepositoryMarker,
                              IPaidDocuemtStudentRepositoryMarker paidDocuemtStudentRepositoryMarker,
                              IPaidDocumentRepositoryMarker paidDocumentRepositoryMarker,
                              IPaidVideoRepositoryMarker paidVideoRepositoryMarker,
                              IPaidVideoStudentRepositoryMarker paidVideoStudentRepositoryMarker,
                              IStudentRepositoryMarker studentRepositoryMarker,
                              IStudentTypeRepositoryMarker studentTypeRepositoryMarker,
                              ISubjectRepositoryMarker subjectRepositoryMarker,
                              ITeacherRepositoryMarker teacherRepositoryMarker,
                              IBookingTimeRepositoryMarker bookingTimeRepositoryMarker,
                              IStudentResourceRepositoryMarker studentResourcesRepositoryMarker,
                              IQAHelpRequestRepositoryMarker qAHelpRequestRepositoryMarker,
                              IAssignmentRepositoryMarker assignmentRepositoryMarker,
                              IAssignmentSubmissionRepositoryMarker assignmentSubmissionRepositoryMarker,
                              ICourseRepositoryMarker courseRepositoryMarker,
                              IEmailService mailService)
        {
            var unitOfWork = new TeachersAssistantUnitOfWork(calendarRepositoryMarker,
                                                             classroomRepositoryMarker,
                                                             freeDocumentRepositoryMarker,
                                                             freeDocumentStudentRepositoryMarker,
                                                             freeVideoRepositoryMarker,
                                                             freeVideoStudentRepositoryMarker,
                                                             paidDocuemtStudentRepositoryMarker,
                                                             paidDocumentRepositoryMarker,
                                                             paidVideoRepositoryMarker,
                                                             paidVideoStudentRepositoryMarker,
                                                             studentRepositoryMarker,
                                                             studentTypeRepositoryMarker,
                                                             subjectRepositoryMarker,
                                                             teacherRepositoryMarker,
                                                             bookingTimeRepositoryMarker,
                                                             studentResourcesRepositoryMarker,
                                                             qAHelpRequestRepositoryMarker,
                                                             assignmentRepositoryMarker,
                                                             assignmentSubmissionRepositoryMarker,
                                                             courseRepositoryMarker);

            unitOfWork.InitializeDbContext(new TeachersAssistantDbContext());
            _emailService      = mailService;
            _teacherRepository = new TeachersAssistantRepositoryServices(unitOfWork);
        }
Ejemplo n.º 4
0
 public TeachersAssistantUnitOfWork(ICalendarBookingRepositoryMarker calendarBookingRepository,
                                    IClassroomRepositoryMarker classroomRepositoryMarker,
                                    IFreeDocumentRepositoryMarker freeDocumentRepositoryMarker,
                                    IFreeDocumentStudentRepositoryMarker freeDocumentStudentRepositoryMarker,
                                    IFreeVideoRepositoryMarker freeVideoRepositoryMarker,
                                    IFreeVideoStudentRepositoryMarker freeVideoStudentRepositoryMarker,
                                    IPaidDocuemtStudentRepositoryMarker paidDocuemtStudentRepositoryMarker,
                                    IPaidDocumentRepositoryMarker paidDocumentRepositoryMarker,
                                    IPaidVideoRepositoryMarker paidVideoRepositoryMarker,
                                    IPaidVideoStudentRepositoryMarker paidVideoStudentRepositoryMarker,
                                    IStudentRepositoryMarker studentRepositoryMarker,
                                    IStudentTypeRepositoryMarker studentTypeRepositoryMarker,
                                    ISubjectRepositoryMarker subjectRepositoryMarker,
                                    ITeacherRepositoryMarker teacherRepositoryMarker,
                                    IBookingTimeRepositoryMarker bookingTimeRepositoryMarker,
                                    IStudentResourceRepositoryMarker studentResourcesRepositoryMarker,
                                    IQAHelpRequestRepositoryMarker qAHelpRequestRepositoryMarker,
                                    IAssignmentRepositoryMarker assignmentRepositoryMarker,
                                    IAssignmentSubmissionRepositoryMarker assignmentSubmissionRepositoryMarker,
                                    ICourseRepositoryMarker courseRepositoryMarker)
 {
     _calendarBookingRepository      = calendarBookingRepository as CalendarBookingRepository;
     _classroomRepository            = classroomRepositoryMarker as ClassroomRepository;
     _freeDocumentRepository         = freeDocumentRepositoryMarker as FreeDocumentRepository;
     _freeDocumentStudentRepository  = freeDocumentStudentRepositoryMarker as FreeDocumentStudentRepository;
     _freeVideoRepository            = freeVideoRepositoryMarker as FreeVideoRepository;
     _freeVideoStudentRepository     = freeVideoStudentRepositoryMarker as FreeVideoStudentRepository;
     _paidDocuemtStudentRepository   = paidDocuemtStudentRepositoryMarker as PaidDocuemtStudentRepository;
     _paidDocumentRepository         = paidDocumentRepositoryMarker as PaidDocumentRepository;
     _paidVideoRepository            = paidVideoRepositoryMarker as PaidVideoRepository;
     _paidVideoStudentRepository     = paidVideoStudentRepositoryMarker as PaidVideoStudentRepository;
     _studentRepository              = studentRepositoryMarker as StudentRepository;
     _studentTypeRepository          = studentTypeRepositoryMarker as StudentTypeRepository;
     _subjectRepository              = subjectRepositoryMarker as SubjectRepository;
     _teacherRepository              = teacherRepositoryMarker as TeacherRepository;
     _bookingTimeRepository          = bookingTimeRepositoryMarker as BookingTimeRepository;
     _studentResourcesRepository     = studentResourcesRepositoryMarker as StudentResourcesRepository;
     _qAHelpRequestRepository        = qAHelpRequestRepositoryMarker as QAHelpRequestRepository;
     _assignmentRepository           = assignmentRepositoryMarker as AssignmentRepository;
     _assignmentSubmissionRepository = assignmentSubmissionRepositoryMarker as AssignmentSubmissionRepository;
     _courseRepository = courseRepositoryMarker as CourseRepository;
 }
Ejemplo n.º 5
0
        public ShoppingController(ICalendarBookingRepositoryMarker calendarRepositoryMarker,
                                  IClassroomRepositoryMarker classroomRepositoryMarker,
                                  IFreeDocumentRepositoryMarker freeDocumentRepositoryMarker,
                                  IFreeDocumentStudentRepositoryMarker freeDocumentStudentRepositoryMarker,
                                  IFreeVideoRepositoryMarker freeVideoRepositoryMarker,
                                  IFreeVideoStudentRepositoryMarker freeVideoStudentRepositoryMarker,
                                  IPaidDocuemtStudentRepositoryMarker paidDocuemtStudentRepositoryMarker,
                                  IPaidDocumentRepositoryMarker paidDocumentRepositoryMarker,
                                  IPaidVideoRepositoryMarker paidVideoRepositoryMarker,
                                  IPaidVideoStudentRepositoryMarker paidVideoStudentRepositoryMarker,
                                  IStudentRepositoryMarker studentRepositoryMarker,
                                  IStudentTypeRepositoryMarker studentTypeRepositoryMarker,
                                  ISubjectRepositoryMarker subjectRepositoryMarker,
                                  ITeacherRepositoryMarker teacherRepositoryMarker,
                                  IBookingTimeRepositoryMarker bookingRepositoryMarker,
                                  IStudentResourceRepositoryMarker studentResourceRepositoryMarker,
                                  IQAHelpRequestRepositoryMarker qAHelpRequestRepositoryMarker,
                                  IAssignmentRepositoryMarker assignmentRepositoryMarker,
                                  IAssignmentSubmissionRepositoryMarker assignmentSubmissionRepositoryMarker,
                                  ICourseRepositoryMarker courseRepositoryMarker)
        {
            Condition.Requires <ICalendarBookingRepositoryMarker>(calendarRepositoryMarker, "calendarRepositoryMarker").IsNotNull();
            Condition.Requires <IClassroomRepositoryMarker>(classroomRepositoryMarker, "classroomRepositoryMarker").IsNotNull();
            Condition.Requires <IFreeDocumentRepositoryMarker>(freeDocumentRepositoryMarker, "freeDocumentRepositoryMarker").IsNotNull();
            Condition.Requires <IFreeDocumentStudentRepositoryMarker>(freeDocumentStudentRepositoryMarker, "freeDocumentStudentRepositoryMarker").IsNotNull();
            Condition.Requires <IFreeVideoRepositoryMarker>(freeVideoRepositoryMarker, "freeVideoRepositoryMarker").IsNotNull();
            Condition.Requires <IFreeVideoStudentRepositoryMarker>(freeVideoStudentRepositoryMarker, "freeVideoStudentRepositoryMarker").IsNotNull();
            Condition.Requires <IPaidDocuemtStudentRepositoryMarker>(paidDocuemtStudentRepositoryMarker, "paidDocuemtStudentRepositoryMarker").IsNotNull();
            Condition.Requires <IPaidDocumentRepositoryMarker>(paidDocumentRepositoryMarker, "paidDocumentRepositoryMarker").IsNotNull();
            Condition.Requires <IPaidVideoRepositoryMarker>(paidVideoRepositoryMarker, "paidVideoRepositoryMarker").IsNotNull();
            Condition.Requires <IPaidVideoStudentRepositoryMarker>(paidVideoStudentRepositoryMarker, "paidVideoStudentRepositoryMarker").IsNotNull();
            Condition.Requires <IStudentRepositoryMarker>(studentRepositoryMarker, "studentRepositoryMarker").IsNotNull();
            Condition.Requires <IStudentTypeRepositoryMarker>(studentTypeRepositoryMarker, "studentTypeRepositoryMarker").IsNotNull();
            Condition.Requires <ISubjectRepositoryMarker>(subjectRepositoryMarker, "subjectRepositoryMarker").IsNotNull();
            Condition.Requires <IStudentTypeRepositoryMarker>(studentTypeRepositoryMarker, "teacherRepositoryMarker").IsNotNull();
            Condition.Requires <IBookingTimeRepositoryMarker>(bookingRepositoryMarker, "bookingRepositoryMarker").IsNotNull();
            Condition.Requires <IStudentResourceRepositoryMarker>(studentResourceRepositoryMarker, "studentResourceRepositoryMarker").IsNotNull();
            Condition.Requires <IQAHelpRequestRepositoryMarker>(qAHelpRequestRepositoryMarker, "qaHelpRequestRepositoryMarker").IsNotNull();
            Condition.Requires <IAssignmentRepositoryMarker>(assignmentRepositoryMarker, "assignmentSubmissionRepositoryMarker").IsNotNull();
            Condition.Requires <IAssignmentSubmissionRepositoryMarker>(assignmentSubmissionRepositoryMarker, "assignmentSubmissionRepositoryMarker").IsNotNull();
            Condition.Requires <ICourseRepositoryMarker>(courseRepositoryMarker, "courseRepositoryMarker").IsNotNull();
            var unitOfWork = new TeachersAssistantUnitOfWork(calendarRepositoryMarker,
                                                             classroomRepositoryMarker,
                                                             freeDocumentRepositoryMarker,
                                                             freeDocumentStudentRepositoryMarker,
                                                             freeVideoRepositoryMarker,
                                                             freeVideoStudentRepositoryMarker,
                                                             paidDocuemtStudentRepositoryMarker,
                                                             paidDocumentRepositoryMarker,
                                                             paidVideoRepositoryMarker,
                                                             paidVideoStudentRepositoryMarker,
                                                             studentRepositoryMarker,
                                                             studentTypeRepositoryMarker,
                                                             subjectRepositoryMarker,
                                                             teacherRepositoryMarker,
                                                             bookingRepositoryMarker,
                                                             studentResourceRepositoryMarker,
                                                             qAHelpRequestRepositoryMarker,
                                                             assignmentRepositoryMarker,
                                                             assignmentSubmissionRepositoryMarker,
                                                             courseRepositoryMarker);

            unitOfWork.InitializeDbContext(new TeachersAssistant.DataAccess.TeachersAssistantDbContext());
            _repositoryServices = new TeachersAssistantRepositoryServices(unitOfWork);
        }