Exemple #1
0
 public void Edit(Post post)
 {
     _posts.Collection.Update(
         Query.EQ("_id", post.PostId),
         Update.Set("Title", post.Title)
             .Set("Url", post.Url)
             .Set("Summary", post.Summary)
             .Set("Details", post.Details));
 }
Exemple #2
0
 public void Create(Post post)
 {
     post.Comments = new List<Comment>();
     _posts.Collection.Save(post);
 }