public IHttpActionResult Delete(Rol rol)
 {
     try
     {
         var rolManagement = new RolManagement();
         rolManagement.Delete(rol);
         apiResponse = new ApiResponse();
         return(Ok(apiResponse));
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }
Exemplo n.º 2
0
 public IActionResult Delete(int id)
 {
     try
     {
         var rm = new RolManagement();
         var c  = new Rol
         {
             id = id
         };
         rm.Delete(c);
         return(Ok());
     }
     catch (Exception ex)
     {
         return(StatusCode(500, ex));
     }
 }