if you use casting in Linq expressions, driver can not determine serialization information. (Was working in 2.0.X)
var updateDefinition = Builders<Message>.Update.Set(x => ((SmsMessage)x).TrackTryCount, smsMessage.TrackTryCount);
_ctx.GetCollection<T>().UpdateOneAsync(x => x.Id.Equals(id), updateDefinition);
System.InvalidOperationException: Unable to determine the serialization information for x => Convert(x).TrackTryCount.
- related to
-
CSHARP-1542 Using abstract type within Queryable Linq statement
- Closed