예제 #1
0
        public ActionResult PostDetails(int id)
        {
            var post = postData.Get(id);

            if (post == null)
            {
                return(View("NotFound"));
            }

            var model = new PostViewModel {
                Post = post, Comments = commentData.GetAllForPost(post.ID)
            };

            return(View(model));
        }