[CSHARP-4558] Support IEnumerable.TypeOf<>() in find() projections Created: 03/Mar/23  Updated: 21/Apr/23

Status: Backlog
Project: C# Driver
Component/s: LINQ3
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Unknown
Reporter: Jasper Li Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CSHARP-3497 LINQ3: Translate All and Any in filters Closed

 Description   

Turn a LINQ3 projection such as: 

players.find(p => true, p => new { SoccerGames = p.games.TypeOf<Soccer>() })

into something like:

db.players.find( {}, { games: { $elemMatch: { _t: "Soccer" } } } )

 



 Comments   
Comment by Robert Stam [ 07/Mar/23 ]

Thanks for reporting this. I will investigate further before long.

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