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)); }
public void Create(Post post) { post.Comments = new List<Comment>(); _posts.Collection.Save(post); }