예제 #1
0
        public IActionResult BlogDetail(Guid blogId = default(Guid))
        {
            if (blogId == Guid.Empty)
            {
                throw new ArgumentNullException($"{nameof(blogId)}");
            }

            _blogService.AddViewCount(blogId);

            var blog = _blogService.GetBlog(blogId);

            ViewBag.Title = blog.Title;

            return(View(blog));
        }