예제 #1
0
 public IHttpActionResult PatchSubTask(int id, [FromBody] JsonPatchDocument <SubTaskDTO> subTaskPatchDocument)
 {
     try
     {
         if (subTaskPatchDocument == null)
         {
             return(BadRequest());
         }
         var result = subTaskService.PatchSubTask(id, subTaskPatchDocument);
         return(Ok(result));
     }
     catch (ValidationException)
     {
         return(NotFound());
     }
     catch (DatabaseException)
     {
         return(BadRequest());
     }
     catch (Exception)
     {
         return(InternalServerError());
     }
 }