public async Task <ActionResult> CreateStatus(string folderId, string title) { try { var status = new CreateStatusDto() { FolderId = folderId, Name = title }; var item = await _taskStatusService.Create(status); var folder = await _folderGetOperations.GetById(folderId); folder.StatusesOrder.Add(item.Id); await _folderWriteOperations.Update(folderId, folder); return(Json(item.Id)); } catch { return(Redirect("/Folder/Folders/" + folderId)); } }