public void EditPost(Post post) { _blogContext.Update(post); _blogContext.Commit(); }
public int AddPost(Post post) { _blogContext.Add(post); _blogContext.Commit(); return post.Id; }
public static string PostLink(this UrlHelper helper, Post post) { return helper.Action("Details", "Blog", new { year = post.PostedOn.Year, month = post.PostedOn.Month, title = post.UrlSlug }); }