public Appointment GetById(int appointmentId) { var result = _appointmentRepository.GetById(appointmentId); if (result != null) { return(GetFullInformation(result)); } return(null); }
public Patient GetById(int patientId) { try { var result = _patientRepository.GetById(patientId); return(result); } catch (Exception ex) { throw ex; } }
/// <summary> /// Get a specific clinic from an id /// </summary> /// <param name="id">The id of the clinic to get</param> /// <returns>A clinic</returns> // GET: api/clinic/5 public IHttpActionResult Get(int id) { var clinicDAL = _clinicRepository.GetById(id); if (clinicDAL != null) { return(Ok(BuildClinic(clinicDAL))); } return(NotFound()); }
public Specialty GetById(int specialtyId) { try { var result = _specialtyRepository.GetById(specialtyId); return(result); } catch (Exception ex) { throw ex; } }