コード例 #1
0
        // GET : Board
        /// <summary>
        /// Gets a "Microsoft.AspNetCore.Mvc.ViewResult" object that renders a View to the response.
        /// The MVC framework will look for a View called "Index" in a folder called "Board".
        /// </summary>
        public IActionResult Index()
        {
            var boards = _boardEntityService.GetAll()
                         .Select(board => new BoardListingModel {
                Id    = board.Id,
                Title = board.Title
            });

            var model = new BoardIndexModel
            {
                BoardList = boards
            };

            return(View(model));
        }