Beispiel #1
0
 public HttpResponseMessage GetRoles()
 {
     try
     {
         var listaRoles = RolesRepository.ConsultarRoles();
         return(Request.CreateResponse(HttpStatusCode.OK, listaRoles));
     }
     catch (Exception e)
     {
         Console.WriteLine($"An Exception has been caught: {e.Message}");
         return(Request.CreateResponse(HttpStatusCode.InternalServerError));
     }
 }