public IHttpActionResult GetById(int id) { try { var appointment = _appointmentManager.GetById <Appointment>(id); var appointmentDTO = _appointmentFactory.CreateAppointmentDTO(appointment); return(Content(HttpStatusCode.OK, appointmentDTO)); } catch (Exception ex) { return(Content(HttpStatusCode.InternalServerError, ex.Message)); } }
public override IHttpActionResult Get(int id) { AppointmentViewModel vm = ToViewModel(appointmentManager.GetById(id)); return(Ok(vm)); }