MongoDb C # driver 2.0 Using BsonNull
I have a property isDeleted
Nullable
in a class Profile
.
Builders<Profile>.Filter.Eq(p => p.IsDeleted, BsonNull.Value)
But the following code caused the following compilation error:
Error 11 Cannot convert lambda expression to type
'MongoDB.Driver.FieldDefinition<MongoDB.DataTypes.Profile,MongoDB.Bson.BsonNull>'
because it is not a delegate type
How do I implement null validation?
+3
source to share