public AppointmentController(IAppointmentRepository appointmentRepository, IAppointmentTypeRepository appointmentTypeRepository, IClientRepository clientRepository, ITherapistRepository therapistRepository, IMapper mapper) { _appointmentRepository = appointmentRepository; _appointmentTypeRepository = appointmentTypeRepository; _clientRepository = clientRepository; _therapistRepository = therapistRepository; _mapper = mapper; }
public UsersController(IUserRepository userRepository, UserManager <IdentityUser> userManager, ICategoryRepository categoryRepository, ICompanyRepository companyRepo, ITherapistRepository therapistRepo, IChallengeRepository challengeRepo) { _userRepo = userRepository; _categoryRepo = categoryRepository; _companyRepo = companyRepo; _therapistRepo = therapistRepo; _challengeRepo = challengeRepo; _userManager = userManager; }
public TherapistsController(ITherapistRepository repo, IUserRepository userRepo, ICategoryRepository categoryRepository, SignInManager <IdentityUser> signInManager, UserManager <IdentityUser> userManager) { _therapistRepo = repo; _userRepo = userRepo; _categoryRepository = categoryRepository; _signInManager = signInManager; _userManager = userManager; }
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; }
public AccountController( SignInManager <IdentityUser> signInManager, UserManager <IdentityUser> userManager, IUserRepository userRepository, ITherapistRepository therapistRepository, IConfiguration config) { _signInManager = signInManager; _userManager = userManager; _therapistRepo = therapistRepository; _userRepo = userRepository; _config = config; }
public TherapistController(ITherapistRepository therapistRepository, IMapper mapper, IValidator <Therapist> validator) { _therapistRepository = therapistRepository; _mapper = mapper; _validator = validator; }
public TherapistController(ITherapistRepository therapistRepository, IMapper mapper, IOptions <AppSettings> appSettings) { _therapistRepository = therapistRepository; _mapper = mapper; _appSettings = appSettings.Value; }
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); }