public HttpResponseMessage PostTaskAsParent(TaskVm parentTaskVm) { var response = new HttpResponseMessage(); try { var res = taskService.CreateParentTask(parentTaskVm); response = Request.CreateResponse(HttpStatusCode.OK, res); } catch (Exception ex) { return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.InnerException)); } return(response); }