[CSHARP-1980] Support Where(c => c.GetType() == type) in LINQ Created: 08/May/17 Updated: 31/Mar/22 |
|
| Status: | Backlog |
| Project: | C# Driver |
| Component/s: | API, Linq |
| Affects Version/s: | 2.4.3 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Lewis Gill | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 10 x64 |
||
| Description |
|
I think this is the same issue as However, I cannot use the "is" clause workaround because I have a set of Type variables that I'm using to build up a dynamic LINQ query, so I can't use the "is" clause, which requires a constant expression. Is there now a way to make the following work with MongoDB? Type type1 = typeof(MyObject1); I've manually verified that using an "is" clause does work on the same query. |
| Comments |
| Comment by Brecht Vanhaesebrouck [ 26/Mar/19 ] |
|
I'd love to see this feature too. |
| Comment by Robert Stam [ 16/May/17 ] |
|
I've reclassified this as an improvement request rather than a bug. This particular LINQ query is currently not supported. |