示例#1
0
        public Appointment GetById(int appointmentId)
        {
            var result = _appointmentRepository.GetById(appointmentId);

            if (result != null)
            {
                return(GetFullInformation(result));
            }

            return(null);
        }
示例#2
0
 public Patient GetById(int patientId)
 {
     try
     {
         var result = _patientRepository.GetById(patientId);
         return(result);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#3
0
        /// <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());
        }
示例#4
0
 public Specialty GetById(int specialtyId)
 {
     try
     {
         var result = _specialtyRepository.GetById(specialtyId);
         return(result);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }