示例#1
0
        public async Task <IActionResult> OnPostCreateItem(long columnId)
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }
            var itemTitle   = Request.Form["create-item-title"];
            var description = Request.Form["create-item-description"];

            var column = await _service.GetColumn(columnId);

            Item item = new Item(itemTitle, description, column);

            item = await _service.CreateItem(item);

            return(RedirectToPage("/BoardPages/ViewBoard", new
            {
                id = item.Column.Board.Id
            }));
        }