Esempio n. 1
0
        public async Task <IActionResult> OnPostCreateColumn(long boardId)
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }
            var columnTitle = Request.Form["create-column-title"];

            var board = await _service.GetBoard(boardId);

            Column column = new Column(columnTitle, board);

            column = await _service.CreateColumn(column);

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