Creating the issue from forum post: https://www.mongodb.com/community/forums/t/issue-with-2-18-to-2-19-nuget-upgrade-of-mongodb-c-driver/211894/10
The problem is when attempting to cast an object as a particular type in a C# LINQ statement to satisfy the C# compiler and access properties, the mongo driver(according to the person who responded in the forum) is attempting to do a server-side $convert
This just started after upgrading from the C# Nuget 2.18 to 2.19. I've uploaded a simple test solution which demonstrates this.
I cannot use the following: public static T UpsertThing<T>( IMongoDatabase DB, Expression<Func<T, bool>> filter, T record) where T: AMongoThing
because we potentially cast as multiple different objects depending on the query and security we are attempting to achieve.