[CSHARP-3979] Support LinqExtensions.Inject in LINQ3 Created: 29/Nov/21  Updated: 28/Oct/23  Resolved: 02/Dec/21

Status: Closed
Project: C# Driver
Component/s: LINQ3
Affects Version/s: 2.14.0
Fix Version/s: 2.14.1

Type: Bug Priority: Major - P3
Reporter: Dimitri Kroo Assignee: Robert Stam
Resolution: Fixed Votes: 0
Labels: Bug
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Hello,

I wanted to test Linq v3 and after changing LingProvider option without any code changes I get this error:

System.InvalidOperationException: 'The LinqExtensions.Inject method is only intended to be used in LINQ Where clauses.'

Code:

collection.AsQueryable(new AggregateOptions { AllowDiskUse = true }).Where(x => filter.Inject())

Thanks!

Best regards

Dimitri

 

 



 Comments   
Comment by Githook User [ 02/Dec/21 ]

Author:

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

Message: CSHARP-3979: Support LinqExtensions.Inject in LINQ3.
Branch: v2.14.x
https://github.com/mongodb/mongo-csharp-driver/commit/c809e8f301e447e69136e90efc922e92a7f1eaae

Comment by Githook User [ 02/Dec/21 ]

Author:

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

Message: CSHARP-3979: Support LinqExtensions.Inject in LINQ3.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/8da3db7a32907e400d22392b0c7a0f9a9c1c0572

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