コード例 #1
0
 public AppointmentValidator(IAppointmentTypeRepository appointmentTypeRepository, IClientRepository clientRepository, ITherapistRepository therapistRepository)
 {
     RuleFor(x => x.Id).NotEmpty();
     RuleFor(x => x.AppointmentType).Custom(async(appointmentType, context) =>
     {
         if (await appointmentTypeRepository.GetById(appointmentType.Id).ConfigureAwait(false) == null)
         {
             context.AddFailure("Appointment Type is invalid.");
         }
     }).When(x => x.AppointmentType != null);
     RuleFor(x => x.Client).Custom(async(client, context) =>
     {
         if (await clientRepository.GetById(client.Id).ConfigureAwait(false) == null)
         {
             context.AddFailure("Client is invalid.");
         }
     }).When(x => x.Client != null);
     RuleFor(x => x.Therapist).Custom(async(therapist, context) =>
     {
         if (await therapistRepository.GetById(therapist.Id).ConfigureAwait(false) == null)
         {
             context.AddFailure("Therapist is invalid.");
         }
     }).When(x => x.Therapist != null);
     RuleFor(x => x.AppointmentDate).Must(x => x != DateTime.MinValue);
 }
コード例 #2
0
 public AppointmentController(IAppointmentRepository appointmentRepository, IAppointmentTypeRepository appointmentTypeRepository, IClientRepository clientRepository, ITherapistRepository therapistRepository, IMapper mapper)
 {
     _appointmentRepository     = appointmentRepository;
     _appointmentTypeRepository = appointmentTypeRepository;
     _clientRepository          = clientRepository;
     _therapistRepository       = therapistRepository;
     _mapper = mapper;
 }
コード例 #3
0
 public BillingController(IBillingRepository billingRepository, IClientRepository clientRepository,
                          ITherapistRepository therapistRepository, IAppointmentRepository appointmentRepository, IAppointmentTypeRepository appointmentTypeRepository,
                          IMapper mapper, IOptions <AppSettings> appSettings)
 {
     _billingRepository         = billingRepository;
     _clientRepository          = clientRepository;
     _therapistRepository       = therapistRepository;
     _appointmentRepository     = appointmentRepository;
     _appointmentTypeRepository = appointmentTypeRepository;
     _mapper      = mapper;
     _appSettings = appSettings.Value;
 }
コード例 #4
0
 public AppointmentsController(IAppointmentRepository appointmentRepository,
                               IVehicleRepository vehicleRepository,
                               IConverterHelper converterHelper,
                               IUserHelper userHelper,
                               IClientRepository clientRepository,
                               IAppointmentTypeRepository appointmentTypeRepository,
                               IMechanicRepository mechanicRepository,
                               IMailHelper mailHelper)
 {
     _appointmentRepository     = appointmentRepository;
     _vehicleRepository         = vehicleRepository;
     _converterHelper           = converterHelper;
     _userHelper                = userHelper;
     _clientRepository          = clientRepository;
     _appointmentTypeRepository = appointmentTypeRepository;
     _mechanicRepository        = mechanicRepository;
     _mailHelper                = mailHelper;
 }
コード例 #5
0
 public UnitOfWork(IRoomRepository roomRepository,
                   IDoctorRepository doctorRepository,
                   IAppointmentTypeRepository appointmentTypeRepository,
                   IClientRepository clientRepository,
                   IPatientRepository patientRepository,
                   ICategoryRepository categoryRepository,
                   IProductRepository productRepository,
                   ISurgeryRoomAppointmentRepository surgeryRoomBooking,
                   EleterosEBContext eleterosEbContext, IAppointmentRepository appointmentRepository)
 {
     _eleterosEbContext        = eleterosEbContext;
     AppointmentRepository     = appointmentRepository;
     RoomRepository            = roomRepository;
     DoctorRepository          = doctorRepository;
     AppointmentTypeRepository = appointmentTypeRepository;
     ClientRepository          = clientRepository;
     PatientRepository         = patientRepository;
     CategoryRepository        = categoryRepository;
     ProductRepository         = productRepository;
     SurgeryRoomBooking        = surgeryRoomBooking;
 }
コード例 #6
0
 public AppointmentTypeBr(IAppointmentTypeRepository appointmentType)
 {
     _appointmentType = appointmentType;
 }
コード例 #7
0
 public AppointmentTypeController(IAppointmentTypeRepository appointmentTypeRepository, IMapper mapper, IValidator <AppointmentType> validator)
 {
     _appointmentTypeRepository = appointmentTypeRepository;
     _mapper    = mapper;
     _validator = validator;
 }
コード例 #8
0
 public AppointmentTypesController(IAppointmentTypeRepository appointmentTypeRepository)
 {
     _appointmentTypeRepository = appointmentTypeRepository;
 }
コード例 #9
0
 public AppointmentTypeService(IAppointmentTypeRepository appointmentRepository, IMapper mapper)
 {
     _appointmentTypeRepository = appointmentRepository;
     _mapper = mapper;
 }
コード例 #10
0
 public AppointmentTypeApiController(IAppointmentTypeRepository _appointmentTypeRepository)
 {
     appointmentTypeRepository = _appointmentTypeRepository;
 }
コード例 #11
0
 public AppointmentTypeController(IAppointmentTypeRepository appointmentTypeRepository, IMapper mapper, IOptions <AppSettings> appSettings)
 {
     _appointmentTypeRepository = appointmentTypeRepository;
     _mapper      = mapper;
     _appSettings = appSettings.Value;
 }
コード例 #12
0
 public AppointmentTypeService(IAppointmentTypeRepository repository)
 {
     _repository = repository;
 }
コード例 #13
0
 public AppointmentTypeServices(IAppointmentTypeRepository AppointmentTypeRepository)
 {
     _AppointmentTypeRepository = AppointmentTypeRepository;
 }