Permalink
Browse files

Added Save(Document) which is an alias for the Update(Document) metho…

…d but is consistent with the other drivers.
  • Loading branch information...
1 parent f79d74b commit 7a4107bfaeb6938c09c46bba11ddd413c094fe01 @samus committed Mar 2, 2010
Showing with 11 additions and 0 deletions.
  1. +11 −0 MongoDBDriver/Collection.cs
@@ -212,6 +212,17 @@ public Collection(string name, Connection conn, string dbName)
}
/// <summary>
+ /// Saves a document to the database using an upsert.
+ /// </summary>
+ /// <remarks>
+ /// The document will contain the _id that is saved to the database. This is really just an alias
+ /// to Update(Document) to maintain consistency between drivers.
+ /// </remarks>
+ public void Save(Document doc){
+ Update(doc);
+ }
+
+ /// <summary>
/// Updates a document with the data in doc as found by the selector.
/// </summary>
/// <remarks>

0 comments on commit 7a4107b

Please sign in to comment.