示例#1
0
 public HttpResponseMessage GetAllAppointmentImportances()
 {
     try
     {
         List <AppointmentImportance> allAppointmentImportances = appointmentImportanceRepository.GetAllAppointmentImportances();
         return(Request.CreateResponse(HttpStatusCode.OK, allAppointmentImportances));
     }
     catch (Exception ex)
     {
         Errors errors = ErrorsHelper.GetErrors(ex);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, errors));
     }
 }
示例#2
0
 public IActionResult GetAllAppointmentImportances()
 {
     try
     {
         List <AppointmentImportance> allAppointmentImportances = appointmentImportanceRepository.GetAllAppointmentImportances();
         return(Ok(allAppointmentImportances));
     }
     catch (Exception ex)
     {
         Errors errors = ErrorsHelper.GetErrors(ex);
         return(StatusCode(StatusCodes.Status500InternalServerError, errors));
     }
 }