Beispiel #1
0
        public ActionResult EditPost(int id)
        {
            var read = new FITlosophiOperations();

            var postToEdit = read.GetPostByID(id);

            return(View(postToEdit));
        }
Beispiel #2
0
        public ActionResult BlogDetail(int postID)
        {
            var blogDetailVM = new BlogDetailViewModel();

            var ops = new FITlosophiOperations();

            blogDetailVM.UserSelectedPost = ops.GetPostByID(postID);
            blogDetailVM.Categories       = ops.GetAllCategories();
            var readMorePosts = ops.GetPostsByAmount(10);

            blogDetailVM.Posts = readMorePosts.Where(p => p.PostID != postID).ToList();


            return(View(blogDetailVM));
        }
Beispiel #3
0
        public Post GetPostByID(int PostID)
        {
            var read = new FITlosophiOperations();

            return(read.GetPostByID(PostID));
        }