コード例 #1
0
 public IActionResult Create(Rol c)
 {
     try
     {
         var rm = new RolManagement();
         rm.Create(c);
         return(Ok());
     }
     catch (Exception ex)
     {
         return(StatusCode(500, ex));
     }
 }
コード例 #2
0
 public IHttpActionResult Post(Rol rol)
 {
     try
     {
         var rolManager = new RolManagement();
         rolManager.Create(rol);
         apiResponse = new ApiResponse();
         return(Ok(apiResponse));
     }
     catch (Exception e)
     {
         return(InternalServerError(e));
     }
 }