Freigeben über


Set-Methoden (LINQ to Entities)

Die meisten LINQ-Set-Methoden werden in LINQ-to-Entities unterstützt. Davon ausgenommen sind Methoden, die einen EqualityComparer verwenden. Weitere Informationen finden Sie unter Standardabfrageoperatoren in LINQ to Entities-Abfragen . In der folgenden Tabelle sind die unterstützten und nicht unterstützten Set-Methoden aufgeführt.

Unterstützte und nicht unterstützte Operatoren

Methode Unterstützung Visual Basic-Funktionssignatur C#-Methodensignatur

All

Wird unterstützt

Function All(Of TSource) ( _
source As IQueryable(Of TSource), _
predicate As Expression(Of Func(Of TSource, Boolean)) _
) As Boolean
bool All<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, bool>> predicate
)

Any

Wird unterstützt

Function Any(Of TSource) ( _
source As IQueryable(Of TSource) _
) As Boolean
bool Any<TSource>(
this IQueryable<TSource> source
)

Any

Wird unterstützt

Function Any(Of TSource) ( _
source As IQueryable(Of TSource), _
predicate As Expression(Of Func(Of TSource, Boolean)) _
) As Boolean
bool Any<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, bool>> predicate
)

Contains

Nicht unterstützt

Function Contains(Of TSource) ( _
source As IQueryable(Of TSource), _
item As TSource _
) As Boolean
bool Contains<TSource>(
this IQueryable<TSource> source,
TSource item
)

Contains

Nicht unterstützt

Function Contains(Of TSource) ( _
source As IQueryable(Of TSource), _
item As TSource, _
comparer As IEqualityComparer(Of TSource) _
) As Boolean
bool Contains<TSource>(
this IQueryable<TSource> source,
TSource item,
IEqualityComparer<TSource> comparer
)

Concat

Wird unterstützt, die Reihenfolge wird jedoch möglicherweise nicht beibehalten

Function Concat(Of TSource) ( _
source1 As IQueryable(Of TSource), _
source2 As IEnumerable(Of TSource) _
) As IQueryable(Of TSource)
IQueryable<TSource> Concat<TSource>(
this IQueryable<TSource> source1,
IEnumerable<TSource> source2
)

DefaultIfEmpty

Nicht unterstützt

Function DefaultIfEmpty(Of TSource) ( _
source As IQueryable(Of TSource) _
) As IQueryable(Of TSource)
IQueryable<TSource> DefaultIfEmpty<TSource>(
this IQueryable<TSource> source
)

DefaultIfEmpty

Nicht unterstützt

Function DefaultIfEmpty(Of TSource) ( _
source As IQueryable(Of TSource), _
defaultValue As TSource _
) As IQueryable(Of TSource)
IQueryable<TSource> DefaultIfEmpty<TSource>(
this IQueryable<TSource> source,
TSource defaultValue
)

Distinct

Wird unterstützt

Function Distinct(Of TSource) ( _
source As IQueryable(Of TSource) _
) As IQueryable(Of TSource)
IQueryable<TSource> Distinct<TSource>(
this IQueryable<TSource> source
)

Distinct

Nicht unterstützt

Function Distinct(Of TSource) ( _
source As IQueryable(Of TSource), _
comparer As IEqualityComparer(Of TSource) _
) As IQueryable(Of TSource)
IQueryable<TSource> Distinct<TSource>(
this IQueryable<TSource> source,
IEqualityComparer<TSource> comparer
)

Except

Wird unterstützt

Function Except(Of TSource) ( _
source1 As IQueryable(Of TSource), _
source2 As IEnumerable(Of TSource) _
) As IQueryable(Of TSource)
IQueryable<TSource> Except<TSource>(
this IQueryable<TSource> source1,
IEnumerable<TSource> source2
)

Except

Nicht unterstützt

Function Except(Of TSource) ( _
source1 As IQueryable(Of TSource), _
source2 As IEnumerable(Of TSource), _
comparer As IEqualityComparer(Of TSource) _
) As IQueryable(Of TSource)
IQueryable<TSource> Except<TSource>(
this IQueryable<TSource> source1,
IEnumerable<TSource> source2,
IEqualityComparer<TSource> comparer
)

Intersect

Wird unterstützt

Function Intersect(Of TSource) ( _
source1 As IQueryable(Of TSource), _
source2 As IEnumerable(Of TSource) _
) As IQueryable(Of TSource)
IQueryable<TSource> Intersect<TSource>(
this IQueryable<TSource> source1,
IEnumerable<TSource> source2
)

Intersect

Nicht unterstützt

Function Intersect(Of TSource) ( _
source1 As IQueryable(Of TSource), _
source2 As IEnumerable(Of TSource), _
comparer As IEqualityComparer(Of TSource) _
) As IQueryable(Of TSource)
IQueryable<TSource> Intersect<TSource>(
this IQueryable<TSource> source1,
IEnumerable<TSource> source2,
IEqualityComparer<TSource> comparer
)

Union

Wird unterstützt

Function Union(Of TSource) ( _
source1 As IQueryable(Of TSource), _
source2 As IEnumerable(Of TSource) _
) As IQueryable(Of TSource)
IQueryable<TSource> Union<TSource>(
this IQueryable<TSource> source1,
IEnumerable<TSource> source2
)

Union

Nicht unterstützt

Function Union(Of TSource) ( _
source1 As IQueryable(Of TSource), _
source2 As IEnumerable(Of TSource), _
comparer As IEqualityComparer(Of TSource) _
) As IQueryable(Of TSource)
IQueryable<TSource> Union<TSource>(
this IQueryable<TSource> source1,
IEnumerable<TSource> source2,
IEqualityComparer<TSource> comparer
)

Siehe auch

Konzepte

Unterstützte und nicht unterstützte Methoden (LINQ to Entities)