예제 #1
0
        public ActionResult DeletePost(int id)
        {
            var post = _postRepository.GetPost(id);

            _postRepository.DeletePost(post);
            _postRepository.DeleteCommentsForPost(post);
            return(RedirectToAction("ViewPosts"));
        }