We’re upgrading some parts of our software to the latest drivers (2.28) from quite old ones (2.9.2).
We’re using fully dynamic model search/count as we let our customers build their own.
Since the upgrade this (simplified) code throws “System.InvalidCastException: ‘Unable to cast object of type ‘MongoDB.Bson.Serialization.Serializers.ObjectSerializer’ to type ‘MongoDB.Bson.Serialization.IBsonDocumentSerializer’.’”
var coll = _mongoDB.GetCollection<dynamic>( "SomeCollectin" );
IFindFluent<dynamic,dynamic> filterfind = coll.Find( _ => true );
return filterfind.CountDocuments();
Anything we should be doing different with this new drivers?