public ActionResult GetSinglePost(string bid, int id) { if (bid == null) bid = blogId; IQueryable<SeqPost> sp = postsRep.GetPost(id); BlogHomeVModel bhvm = new BlogHomeVModel(); bhvm.BlogId = bid; bhvm.RecentPosts = VModelFactory.BlogPosts(sp); bhvm.AllCategories = VModelFactory.AllCategories( catRep.AllCategories(bid),bid); return View(bhvm); }
Post IMetaWeblog.GetPost(string postid, string username, string password) { if (InvalidUser(username, password)) { throw new XmlRpcFaultException(INVALID_CREDENTIALS, INVALID_CREDENTIALS_MSG); } SeqPost sp = postsRep.GetPost(Convert.ToInt32(postid)) .SingleOrDefault <SeqPost>(); Post post = new Post(); post.postid = sp.PostId; post.description = sp.Description; post.title = sp.Title; post.dateCreated = sp.CreateDate; post.mt_excerpt = sp.Excerpt; post.mt_text_more = sp.ExtendedText; post.mt_keywords = tagRep.GetKeywords(sp.PostId); post.categories = new string[] { sp.SeqCategory.Name }; return(post); }