Exemplo n.º 1
0
 public void EditPost(Post post)
 {
     _blogContext.Update(post);
     _blogContext.Commit();
 }
Exemplo n.º 2
0
 public int AddPost(Post post)
 {
     _blogContext.Add(post);
     _blogContext.Commit();
     return post.Id;
 }
Exemplo n.º 3
0
 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 });
 }