[CSHARP-2800] Using Pipelines in MongoQueryable Created: 21/Oct/19  Updated: 11/Nov/19  Resolved: 11/Nov/19

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

Type: Improvement Priority: Major - P3
Reporter: Ross Buggins Assignee: Vincent Kam (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Hi,

I have a aggregate pipeline that is built through various means, but then gives me an IAsyncCursor<T>.

I would then like to make the results from the IQuerable to apply Odata / LINQ to this.

 

Whats the best way of achieving this:

1) Create PipelineDefinition<T,U>

2) Apply pipleline definition to Collection

3) ** Now do AsQuereable on the result of the Agreate pipline apply, not to the collection.

Thanks,

Ross



 Comments   
Comment by Vincent Kam (Inactive) [ 21/Oct/19 ]

Hi rbugginsvia,
Thank you for filing a Jira ticket. If your intention is to create a pipeline definition by mixing LINQ and PipeLineDefinition (resulting in a combined pipeline), then unfortunately we currently have no plans to support this feature. If your intention is to run a client-side LINQ query on the results of your aggregation pipeline, you could simply run .ToList() on the IAsyncCursor<T>  that the aggregation pipeline returns, and then you should be able to query this list using LINQ.
 
Kind regards,
Vincent 

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