DataSource for Entity Framework in WPF > Programming Guide > Query Operators Supported in Live Views |
LiveLinq supports all LINQ query operators in its queries. Not all operators have LiveLinq-specific implementation benefiting from indexes and other query execution optimization techniques, but such operations simply use the standard LINQ to Objects (or LINQ to XML) implementations, so it is transparent to the user.
However, not all query operations can be used in live views. This is because not all query operations have incremental view maintenance algorithms, as some would require re-populating from scratch (requerying) every time they are maintained. If your query contains such operations, you won't be able to use that query to create a live view. An attempt to do that will cause a compilation error.
Here is the list of query operators allowed in live views:
Operator |
Notes |
Select |
Overload with selector depending on the index is not allowed. |
Where |
Overload with predicate depending on the index is not allowed. |
Join |
Overload with comparer is not allowed. |
GroupJoin |
Overload with comparer is not allowed. |
OrderBy |
Overload with comparer is not allowed. |
OrderByDescending |
Overload with comparer is not allowed. |
GroupBy |
Overload with comparer is not allowed. |
SelectMany |
Overloads with selector and collectionSelector depending on the index are not allowed. |
Union |
|
Concat |
|
Aggregate |
Use LiveAggregate method if you want to optimize performance with incremental view maintenance. |
Count |
Use LiveCount method if you want to optimize performance with incremental view maintenance. |
Min/Max |
Use LiveMin/LiveMax methods if you want to optimize performance with incremental view maintenance. |
Sum |
Use LiveSum method if you want to optimize performance with incremental view maintenance. |
Average |
Use LiveAverage method if you want to optimize performance with incremental view maintenance. |