示例#1
0
 public IHttpActionResult PutSubTask([FromBody] SubTaskDTO subTaskDTO, int id)
 {
     try
     {
         if (subTaskDTO == null)
         {
             return(BadRequest());
         }
         var result = subTaskService.UpdateSubTask(subTaskDTO, id);
         return(Ok(result));
     }
     catch (ValidationException)
     {
         return(NotFound());
     }
     catch (DatabaseException)
     {
         return(BadRequest());
     }
     catch (Exception)
     {
         return(BadRequest());
     }
 }