CSHARP-6223ClosedFixed
LINQ3 regression since v3.10: Project(MemberInit) with date string formatting throws VisitMemberInit/NewExpression InvalidOperationException
After upgrading MongoDB .NET/C# Driver from 3.9.0 to 3.10.0 (still reproducible on 3.11.1), a previously working LINQ projection now throws: *Environment* • MongoDB.Driver: 3.11.1 (regression started in 3.10.0) • .NET: 8.0 • Query executed via LINQ3 provider (Find(...).Project(...).ToList()) *Repro shape* The exception is thrown in a Project with new DTO \{ ... } (MemberInit) when formatting a BsonDateTime to string inside projection: The rest of the projectio