| MongoDBUtilityAddOrReplace Method (String, String, ExpandoObject) |
Adds or replaces a document within the specified collection.
Namespace:
Galactic.NoSql.MongoDB
Assembly:
Galactic.NoSql.MongoDB (in Galactic.NoSql.MongoDB.dll) Version: 1.3.0.499 (1.3.0.499)
Syntax public string AddOrReplace(
string id,
string collection,
ExpandoObject document
)
Public Function AddOrReplace (
id As String,
collection As String,
document As ExpandoObject
) As String
public:
String^ AddOrReplace(
String^ id,
String^ collection,
ExpandoObject^ document
)
member AddOrReplace :
id : string *
collection : string *
document : ExpandoObject -> string
Parameters
- id
- Type: SystemString
The id of the document to add or replace. If null the document will be added with a newly generated id. - collection
- Type: SystemString
The name of the collection to add or replace the document within. - document
- Type: System.DynamicExpandoObject
The document to add or replace. Note: These must be able to be serialized as a BsonDocument.
Return Value
Type:
StringThe id of the document if it was added or replaced, null otherwise.
See Also