更新文档
var client = new MongoClient(“mongodb:// localhost:27017”); var database = client.GetDatabase(test
); var collection = database.GetCollection <Interactions>(Interactions
);
var update = MongoDB.Driver .Builders .Update.Set(s => s.SiteName,New Example
);
collection.FindOneAndUpdate(s => s.SiteName ==Example
,update);