public ActionResult Edit(Post post) { if (ModelState.IsValid) { post.Url = post.Title.ToUrl(); post.Author = User.Identity.Name; post.Date = DateTime.Now; _postService.Save(post); return RedirectToAction("Index"); } return View(); }
public void DeleteComment(Post post, ObjectId commentID) { Context.Post.DeleteComment(post, commentID); }
public void Save(Post post) { Context.Post.Update(post); }
public void Delete(Post post) { Context.Post.Delete(post.PostId); }