} // Index() end

        /// <summary>
        /// 상세페이지 조회
        /// </summary>
        /// <returns></returns>
        public ActionResult Detail(int?boardNo)
        {
            //using (var db = new BoardAppDbContext())
            //{
            //    var board = db.Boards.FirstOrDefault(n => n.BoardNo.Equals(boardNo));
            //    return View(board);
            //}
            if (boardNo != null)
            {
                Board board = boardService.Detail((int)boardNo);
                if (board != null)
                {
                    return(View(board));
                }
                return(Redirect("Index"));
            }
            return(Redirect("Index"));
        }