次の方法で共有


セット メソッド (LINQ to Entities)

EqualityComparer を使用する LINQ セット メソッドを除いて、LINQ to Entities クエリではほとんどの LINQ セット メソッドがサポートされています。詳細については、「LINQ to Entities クエリの標準クエリ演算子」を参照してください。次の表に、サポート対象のセット メソッドとサポート非対象のセット メソッドを示します。

サポート対象の演算子とサポート非対象の演算子

メソッド サポート Visual Basic 関数シグネチャ C# メソッド シグネチャ

All

サポート対象

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

サポート対象

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

Any

サポート対象

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

サポート非対象

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

Contains

サポート非対象

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

サポート対象。ただし、順序は必ずしも維持されません。

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

サポート非対象

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

DefaultIfEmpty

サポート非対象

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

サポート対象

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

Distinct

サポート非対象

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

サポート対象

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

サポート非対象

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

サポート対象

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

サポート非対象

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

サポート対象

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

サポート非対象

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
)

参照

概念

サポート対象のメソッドとサポート非対象のメソッド (LINQ to Entities)