public HttpResponseMessage GetAvailableDoctors(HttpRequestMessage request, DateTime appointmentDate,int doctorType) { return GetHttpResponse(request, () => { _doctorService = new DoctorClient(); var doctors = _doctorService.GetDoctorsWithSpecializationOnDate(doctorType, appointmentDate); return request.CreateResponse<Doctor[]>(HttpStatusCode.OK, doctors); }); }