We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents aa24a1d + d70aa13 commit b11a0cdCopy full SHA for b11a0cd
source/includes/code/dotnet/CrudUpdateFinalQuery.cs
@@ -1,5 +1,6 @@
1
using MongoDB.Bson;
2
using MongoDB.Driver;
3
+using MongoDB.Bson.Serialization.Conventions;
4
5
// Replace the uri string with your MongoDB deployment's connection string.
6
var uri = "mongodb+srv://<user>:<password>@<cluster-url>?retryWrites=true&writeConcern=majority";
@@ -12,7 +13,7 @@
12
13
14
// database and collection code goes here
15
var db = client.GetDatabase("sample_guides");
-var coll = db.GetCollection<BsonDocument>("comets");
16
+var coll = db.GetCollection<Comet>("comets");
17
18
// update code goes here
19
var filter = Builders<Comet>.Filter.Empty;
0 commit comments