Supported and Unsupported LINQ Methods (LINQ to Entities)
This section provides information about the Language-Integrated Query (LINQ) standard query operators that are supported or unsupported in LINQ to Entities queries. Many of the LINQ standard query operators have an overloaded version that accepts an integer argument. The integer argument corresponds to a zero-based index in the sequence that is being operated on, an IEqualityComparer, or IComparer. Unless otherwise specified, these overloaded versions of the LINQ standard query operators are not supported, and attempting to use them will throw an exception.
Projection and Restriction Methods
Most of the LINQ projection and restriction methods are supported in LINQ to Entities queries, with the exception of those that accept a positional argument. For more information, see Standard Query Operators in LINQ to Entities Queries. The following table lists the supported and unsupported projection and restriction methods.
Method | Support | Visual Basic function signature | C# method signature |
---|---|---|---|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
Join Methods
The LINQ join methods are supported in LINQ to Entities, with the exception of those that accept an IEqualityComparer because the comparer cannot be translated to the data source. For more information, see Standard Query Operators in LINQ to Entities Queries. The following table lists the supported and unsupported join methods.
Method | Support | Visual Basic function signature | C# method signature |
---|---|---|---|
Supported |
|
|
|
Not Supported |
|
|
|
Supported |
|
|
|
Not Supported |
|
|
Set Methods
Most of the LINQ set methods are supported in LINQ to Entities queries, with the exception of those that use an EqualityComparer. For more information, see Standard Query Operators in LINQ to Entities Queries. The following table lists the supported and unsupported set methods.
Method | Support | Visual Basic function signature | C# method signature |
---|---|---|---|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported, but there is no guarantee of order being preserved |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
Ordering Methods
Most of the LINQ ordering methods are supported in LINQ to Entities, with the exception of those that accept an IComparer, because the comparer cannot be translated to the data source. For more information, see Standard Query Operators in LINQ to Entities Queries. The following table lists the supported and unsupported ordering methods.
Method | Support | Visual Basic function signature | C# method signature |
---|---|---|---|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
Grouping Methods
Most of the LINQ grouping methods are supported in LINQ to Entities, with the exception of those that accept an IEqualityComparer, because the comparer cannot be translated to the data source. For more information, see Standard Query Operators in LINQ to Entities Queries. The following table lists the supported and unsupported grouping methods.
Method | Support | Visual Basic function signature | C# method signature |
---|---|---|---|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
Aggregate Methods
Most of the aggregate methods that accept primitive data types are supported in LINQ to Entities. For more information, see Standard Query Operators in LINQ to Entities Queries. The following table lists the supported and unsupported aggregate methods.
Method | Support | Visual Basic function signature | C# method signature |
---|---|---|---|
Not supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Sum |
Not supported |
|
|
Not supported |
|
|
|
Sum |
Not supported |
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Sum |
Not supported |
|
|
Not supported |
|
|
|
Sum |
Not supported |
|
|
Type Methods
The LINQ standard query operators that deal with CLR type conversion and testing are supported in the Entity Framework. Only CLR types that map to conceptual model types are supported in LINQ to Entities. For a list of conceptual model types, see Conceptual Model Types (CSDL). The following table lists the supported and unsupported type methods.
Method | Support | Visual Basic function signature | C# method signature |
---|---|---|---|
Supported for EDM primitive types |
|
|
|
Supported for EntityType |
|
|
Paging Methods
A number of the LINQ paging methods are not supported in LINQ to Entities queries. For more information, see Standard Query Operators in LINQ to Entities Queries. The following table lists the supported and unsupported paging methods.
Method | Support | Visual Basic function signature | C# method signature |
---|---|---|---|
Not supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|
|
Supported |
|
|
|
Not supported |
|
|
|
Not supported |
|
|