public EnrollmentCommandHandler2(StudentRepository studentRepository,
                                  ClassRepository classRepository,
                                  StudentArchiveRepository studentArchiveRepository,
                                  UnitOfWork unitOfWork,
                                  EnrollementNotificationService notificationService,
                                  ILogger logger,
                                  AuthorizationService authorizationService,
                                  CalendarService calendarService,
                                  ServiceFoo serviceFoo,
                                  ServiceBlah serviceBlah,
                                  FactoryFoo facoFactoryFoo,
                                  FactoryBlah factoryBlah
                                  )
 {
     _studentRepository        = studentRepository;
     _classRepository          = classRepository;
     _studentArchiveRepository = studentArchiveRepository;
     _unitOfWork          = unitOfWork;
     _notificationService = notificationService;
     _logger = logger;
     _authorizationService = authorizationService;
     _calendarService      = calendarService;
     _serviceFoo           = serviceFoo;
     _serviceBlah          = serviceBlah;
     _facoFactoryFoo       = facoFactoryFoo;
     _factoryBlah          = factoryBlah;
 }
示例#2
0
 public EnrollmentCommandHandler(StudentRepository studentRepository,
                                 ClassRepository classRepository,
                                 StudentArchiveRepository studentArchiveRepository)
 {
     _studentRepository        = studentRepository;
     _classRepository          = classRepository;
     _studentArchiveRepository = studentArchiveRepository;
 }
示例#3
0
        public void Unroll(StudentRepository studentRepository, ClassRepository classRepository,
                           StudentArchiveRepository studentArchiveRepository, StudentUnrollCommand command)
        {
            var student        = studentRepository.GetById(command.StudentId);
            var @class         = classRepository.GetById(command.ClassId);
            var studentArchive = studentArchiveRepository.GetById(command.StudentId);

            student.Unroll(@class);
            @class.Unroll(student);
            studentArchive.AddToPassedEnrollements(student.LastUnrolled, command.Reason);
        }