public async Task <IActionResult> OnPostEditItem(long id) { if (!ModelState.IsValid) { return(Page()); } Item = await _service.GetItem(id); var itemTitle = Request.Form["item-title"]; var itemDescription = Request.Form["item-description"]; long itemColumnId = long.Parse(Request.Form["item-column"]); Column column = await _service.GetColumn(itemColumnId); Item = Item.EditItem(itemTitle, itemDescription, column); await _service.EditItem(Item); return(RedirectToPage("/BoardPages/ViewBoard", new { id = Item.Column.Board.Id })); }