[CSHARP-4376] Add LINQ3 support for untyped CreateQuery Created: 21/Oct/22  Updated: 23/Mar/23  Resolved: 26/Oct/22

Status: Closed
Project: C# Driver
Component/s: LINQ3
Affects Version/s: 2.18.0
Fix Version/s: 2.19.0

Type: Improvement Priority: Unknown
Reporter: Alistair Steele Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by CSHARP-4451 [LINQ3] System.Linq.Dynamic.Core.Dyna... Closed

 Description   

LINQ2 supported creating queries from expression trees via the MongoQueryProviderImpl.CreateQuery (non-generic) method.

This mechanism is used by the Dynamic LINQ (it first converts a textual query into an expression tree and the passes it to CreateQuery).

LINQ3 doesn't provide an implementation of this method (MongoQueryProvider.CreateQuery just throws).

It should be simple to re-add the support for LINQ3 as LINQ2 simply used reflection to create the fully typed query object.

 

I'm unsure if this was deliberately omitted from v3, apologies if that's the case.

Many thanks



 Comments   
Comment by Githook User [ 26/Oct/22 ]

Author:

{'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}

Message: CSHARP-4376: Add LINQ3 support for untyped CreateQuery.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/abb019397908b1dad84c2c63cc5b11dfc2f4af46

Comment by Dmitry Lukyanov (Inactive) [ 21/Oct/22 ]

Thank you alistair.steele@trapdoorlabs.uk for your report. We will consider this work and will back to you

Generated at Wed Feb 07 21:48:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.