public DoctorService(IOperationRepository operationRepository, IAppointmentRepository appointmentRepository, IEmployeesScheduleRepository employeesScheduleRepository, IDoctorRepository doctorRepository) { this._doctorRepository = doctorRepository; this._operationRepository = operationRepository; this._appointmentRepository = appointmentRepository; this._employeesScheduleRepository = employeesScheduleRepository; this.regularAppointmentService = new RegularAppointmentService(appointmentRepository, employeesScheduleRepository, this, new PatientsRepository(), new OperationService(operationRepository)); }
public DoctorService(MyDbContext context) { this._doctorRepository = new DoctorRepository(context); this._operationRepository = new OperationRepository(context); this._appointmentRepository = new AppointmentRepository(context); this._employeesScheduleRepository = new EmployeesScheduleRepository(context); this.regularAppointmentService = new RegularAppointmentService(_appointmentRepository, _employeesScheduleRepository, this, new PatientsRepository(context), new OperationService(_operationRepository)); }
/// <summary>This constructor injects the PatientService with matching IPatientsRepository.</summary> public PatientService(IPatientsRepository patientsRepository, IEmailVerificationService emailVerificationService, RegularAppointmentService regularAppointmentService) { PatientsRepository = patientsRepository; EmailVerificationService = emailVerificationService; _regularAppointmentService = regularAppointmentService; }