var result = Builders<BsonDocument>.Filter.Where(x => x["_id"] != "");
|
var registry = BsonSerializer.SerializerRegistry;
|
var serializer = registry.GetSerializer<BsonDocument>();
|
var mql = result.Render(serializer, registry, Linq.LinqProvider.V3);
|
The above code triggers exception:
MongoDB.Driver.Linq.ExpressionNotSupportedException: 'Expression not supported: (x.get_Item("_id") != ).'
|
in this line https://github.com/mongodb/mongo-csharp-driver/blob/88769e2bd8866abd40c274552e38127400a0e731/src/MongoDB.Driver/Linq/Linq3Implementation/Translators/ExpressionToFilterTranslators/ExpressionTranslators/StringExpressionToRegexFilterTranslator.cs#L305.