The exception occurs in the method GetFieldExpression, for the following expression:
e => ((e.GetType() == BusinessPartner) AndAlso (e.PrivateExchangeId == "something"))
The code triggering the exception is:
var documentSerializer = BsonSerializer.SerializerRegistry.GetSerializer<T>();
var renderedFilter = filterDefinition.Render(documentSerializer, BsonSerializer.SerializerRegistry).ToString(); // the exception occurs in Render
The filter definition is of type MongoDB.Driver.AndFilterDefinition<BusinessPartner>, and has as expression the expression provided above.
- duplicates
-
CSHARP-4691 Support GetType comparison in LINQ3
- Closed