[CSHARP-1737] LinqToMongo.Inject() throws Execption Created: 05/Aug/16  Updated: 08/Aug/16  Resolved: 08/Aug/16

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 2.2.4
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Osman Erdem Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CSHARP-1445 Support arbitrary filters in the LIN... Closed

 Description   

var point = GeoJson.Point(GeoJson.Geographic(locationAddress.Coordinates.Longitude, locationAddress.Coordinates.Latitude));

var locationClause = Query<CarAuctionItem>.Near(y => y.Address.Location, point, maxDistance);

collection.AsQueryable.Where(x => locationClause.Inject()).ToList();



 Comments   
Comment by Craig Wilson [ 08/Aug/16 ]

Hi Osman,

We don't support the Query builders Inject method in the new API. It will still work with the old API, just not the new one. We have added support to do the same thing with a FilterDefinition in the new API. It will be released with version 2.3.0.

Craig

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