public ActionResult Create(int projectId, Base.Model.Task task) { try { if (User.Identity.IsAuthenticated) { ITaskLogic logic = container.Resolve <ITaskLogic>(); logic.HandleTaskAdd(task, projectId, User.Identity.Name); return(Json(new JsonDataHandler(httpCode: HttpCodeEnum.Created, message: "Task successfully created!").getInfo(), JsonRequestBehavior.AllowGet)); } return(Json(new JsonDataHandler(httpCode: HttpCodeEnum.Forbidden).getWarning(), JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new JsonDataHandler(ex).getError(), JsonRequestBehavior.AllowGet)); } }