-
Type: New Feature
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 1.4
-
Component/s: None
-
None
Assume D is a subclass of C:
var query = collection.AsQueryable<C>().OfType<D>();
or using query syntax and type comparisons support either of the following:
var query = from c in collection.AsQueryable<C>() where c is D select c; var query = from c in collection.AsQueryable<C>() where c.GetType() == typeof(D) select c;
The second example differs slightly in that it should not match subclasses of D.
These would be translated into queries against the "_t" discriminator value.
- is related to
-
CSHARP-631 Update LINQ supported features documentation
- Closed