Esempio n. 1
0
 public HttpResponseMessage GetOneAppointmentImportance(int importanceId)
 {
     try
     {
         AppointmentImportance appointmentImportance = appointmentImportanceRepository.GetOneAppointmentImportance(importanceId);
         return(Request.CreateResponse(HttpStatusCode.OK, appointmentImportance));
     }
     catch (Exception ex)
     {
         Errors errors = ErrorsHelper.GetErrors(ex);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, errors));
     }
 }
Esempio n. 2
0
 public IActionResult GetOneAppointmentImportance(int importanceId)
 {
     try
     {
         AppointmentImportance appointmentImportance = appointmentImportanceRepository.GetOneAppointmentImportance(importanceId);
         return(Ok(appointmentImportance));
     }
     catch (Exception ex)
     {
         Errors errors = ErrorsHelper.GetErrors(ex);
         return(StatusCode(StatusCodes.Status500InternalServerError, errors));
     }
 }