3

How can i convert a BsonDocument to the FilterDefinition<BsonDocument> instance?

It is a class provided by new MongoDb C# driver.

4

1 回答 1

7

BsonDocument和之间有一个隐式转换FilterDefinition。你不需要转换它:

BsonDocument bsonDocument = new BsonDocument();
FilterDefinition<BsonDocument> filterDefinition = bsonDocument;
于 2015-08-06T12:42:10.520 回答