次の方法で共有


集計メソッド (LINQ to Entities)

プリミティブ データ型を受け入れる集計メソッドのほとんどが LINQ to Entities でサポートされています。詳細については、「LINQ to Entities クエリの標準クエリ演算子」を参照してください。次の表に、サポート対象の集計メソッドとサポート非対象の集計メソッドを示します。

サポート対象のメソッドとサポート非対象のメソッド

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

Aggregate

サポート非対象

Function Aggregate(Of TSource) ( _
source As IQueryable(Of TSource), _
func As Expression(Of Func(Of TSource, TSource, TSource)) _
) As TSource
TSource Aggregate<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, TSource, TSource>> func
)

Aggregate

サポート非対象

Function Aggregate(Of TSource, TAccumulate) ( _
source As IQueryable(Of TSource), _
seed As TAccumulate, _
func As Expression(Of Func(Of TAccumulate, TSource, TAccumulate)) _
) As TAccumulate
TAccumulate Aggregate<TSource, TAccumulate>(
this IQueryable<TSource> source,
TAccumulate seed,
Expression<Func<TAccumulate, TSource, TAccumulate>> func
)

Aggregate

サポート非対象

Function Aggregate(Of TSource, TAccumulate, TResult) ( _
source As IQueryable(Of TSource), _
seed As TAccumulate, _
func As Expression(Of Func(Of TAccumulate, TSource, TAccumulate)), _
selector As Expression(Of Func(Of TAccumulate, TResult)) _
) As TResult
TResult Aggregate<TSource, TAccumulate, TResult>(
this IQueryable<TSource> source,
TAccumulate seed,
Expression<Func<TAccumulate, TSource, TAccumulate>> func,
Expression<Func<TAccumulate, TResult>> selector
)

Average

サポート対象

Function Average ( _
source As IQueryable(Of Decimal) _
) As Decimal
decimal Average(
this IQueryable<decimal> source
)

Average

サポート対象

Function Average ( _
source As IQueryable(Of Double) _
) As Double
double Average(
this IQueryable<double> source
)

Average

サポート対象

Function Average ( _
source As IQueryable(Of Integer) _
) As Double
double Average(
this IQueryable<int> source
)

Average

サポート対象

Function Average ( _
source As IQueryable(Of Long) _
) As Double
double Average(
this IQueryable<long> source
)

Average

サポート対象

Function Average ( _
source As IQueryable(Of Nullable(Of Decimal)) _
) As Nullable(Of Decimal)
Nullable<decimal> Average(
this IQueryable<Nullable<decimal>> source
)

Average

サポート対象

Function Average ( _
source As IQueryable(Of Nullable(Of Double)) _
) As Nullable(Of Double)
Nullable<double> Average(
this IQueryable<Nullable<double>> source
)

Average

サポート対象

Function Average ( _
source As IQueryable(Of Nullable(Of Integer)) _
) As Nullable(Of Double)
Nullable<double> Average(
this IQueryable<Nullable<int>> source
)

Average

サポート対象

Function Average ( _
source As IQueryable(Of Nullable(Of Long)) _
) As Nullable(Of Double)
Nullable<double> Average(
this IQueryable<Nullable<long>> source
)

Average

サポート対象

Function Average ( _
source As IQueryable(Of Nullable(Of Single)) _
) As Nullable(Of Single)
Nullable<float> Average(
this IQueryable<Nullable<float>> source
)

Average

サポート対象

Function Average ( _
source As IQueryable(Of Single) _
) As Single
float Average(
this IQueryable<float> source
)

Average

サポート非対象

Function Average(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Integer)) _
) As Double
double Average<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, int>> selector
)

Average

サポート非対象

Function Average(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Nullable(Of Integer))) _
) As Nullable(Of Double)
Nullable<double> Average<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, Nullable<int>>> selector
)

Average

サポート非対象

Function Average(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Long)) _
) As Double
double Average<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, long>> selector
)

Average

サポート非対象

Function Average(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Nullable(Of Long))) _
) As Nullable(Of Double)
Nullable<double> Average<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, Nullable<long>>> selector
)

Average

サポート非対象

Function Average(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Single)) _
) As Single
float Average<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, float>> selector
)

Average

サポート非対象

Function Average(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Nullable(Of Single))) _
) As Nullable(Of Single)
Nullable<float> Average<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, Nullable<float>>> selector
)

Average

サポート非対象

Function Average(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Double)) _
) As Double
double Average<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, double>> selector
)

Average

サポート非対象

Function Average(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Nullable(Of Double))) _
) As Nullable(Of Double)
Nullable<double> Average<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, Nullable<double>>> selector
)

Average

サポート非対象

Function Average(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Decimal)) _
) As Decimal
decimal Average<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, decimal>> selector
)

Average

サポート非対象

Function Average(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Nullable(Of Decimal))) _
) As Nullable(Of Decimal)
Nullable<decimal> Average<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, Nullable<decimal>>> selector
)

Count

サポート対象

Function Count(Of TSource) ( _
source As IQueryable(Of TSource) _
) As Integer
int Count<TSource>(
this IQueryable<TSource> source
)

Count

サポート非対象

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

LongCount

サポート対象

Function LongCount(Of TSource) ( _
source As IQueryable(Of TSource) _
) As Long
long LongCount<TSource>(
this IQueryable<TSource> source
)

LongCount

サポート非対象

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

Max

サポート対象

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

Max

サポート非対象

Function Max(Of TSource, TResult) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, TResult)) _
) As TResult
TResult Max<TSource, TResult>(
this IQueryable<TSource> source,
Expression<Func<TSource, TResult>> selector
)

Min

サポート対象

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

Min

サポート非対象

Function Min(Of TSource, TResult) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, TResult)) _
) As TResult
TResult Min<TSource, TResult>(
this IQueryable<TSource> source,
Expression<Func<TSource, TResult>> selector
)

Sum

サポート対象

Function Sum ( _
source As IQueryable(Of Decimal) _
) As Decimal
decimal Sum(
this IQueryable<decimal> source
)

Sum

サポート対象

Function Sum ( _
source As IQueryable(Of Double) _
) As Double
double Sum(
this IQueryable<double> source
)

Sum

サポート対象

Function Sum ( _
source As IQueryable(Of Integer) _
) As Integer
int Sum(
this IQueryable<int> source
)

Sum

サポート対象

Function Sum ( _
source As IQueryable(Of Long) _
) As Long
long Sum(
this IQueryable<long> source
)

Sum

サポート対象

Function Sum ( _
source As IQueryable(Of Nullable(Of Decimal)) _
) As Nullable(Of Decimal)
Nullable<decimal> Sum(
this IQueryable<Nullable<decimal>> source
)

Sum

サポート対象

Function Sum ( _
source As IQueryable(Of Nullable(Of Double)) _
) As Nullable(Of Double)
Function Sum ( _
source As IQueryable(Of Nullable(Of Double)) _
) As Nullable(Of Double)Nullable<double> Sum(
this IQueryable<Nullable<double>> source
)

Sum

サポート対象

Function Sum ( _
source As IQueryable(Of Nullable(Of Integer)) _
) As Nullable(Of Integer)
Nullable<int> Sum(
this IQueryable<Nullable<int>> source
)

Sum

サポート対象

Function Sum ( _
source As IQueryable(Of Nullable(Of Long)) _
) As Nullable(Of Long)
Nullable<long> Sum(
this IQueryable<Nullable<long>> source
)

Sum

サポート対象

Function Sum ( _
source As IQueryable(Of Nullable(Of Single)) _
) As Nullable(Of Single)
Nullable<float> Sum(
this IQueryable<Nullable<float>> source
)

Sum

サポート対象

Function Sum ( _
source As IQueryable(Of Single) _
) As Single
float Sum(
this IQueryable<float> source
)

Sum

サポート非対象

Function Sum(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Integer)) _
) As Integer
int Sum<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, int>> selector
)

Sum

サポート非対象

Function Sum(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Nullable(Of Integer))) _
) As Nullable(Of Integer)
Nullable<int> Sum<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, Nullable<int>>> selector
)

Sum

サポート非対象

Function Sum(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Long)) _
) As Long
long Sum<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, long>> selector
)

Sum

サポート非対象

Function Sum(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Nullable(Of Long))) _
) As Nullable(Of Long)
Nullable<long> Sum<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, Nullable<long>>> selector
)

Sum

サポート非対象

Function Sum(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Nullable(Of Single))) _
) As Nullable(Of Single)
Nullable<float> Sum<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, Nullable<float>>> selector
)

Sum

サポート非対象

Function Sum(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Single)) _
) As Single
float Sum<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, float>> selector
)

Sum

サポート非対象

Function Sum(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Double)) _
) As Double
double Sum<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, double>> selector
)

Sum

サポート非対象

Function Sum(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Nullable(Of Double))) _
) As Nullable(Of Double)
Nullable<double> Sum<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, Nullable<double>>> selector
)

Sum

サポート非対象

Function Sum(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Decimal)) _
) As Decimal
decimal Sum<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, decimal>> selector
)

Sum

サポート対象

Function Sum(Of TSource) ( _
source As IQueryable(Of TSource), _
selector As Expression(Of Func(Of TSource, Nullable(Of Decimal))) _
) As Nullable(Of Decimal)
Nullable<decimal> Sum<TSource>(
this IQueryable<TSource> source,
Expression<Func<TSource, Nullable<decimal>>> selector
)

参照

概念

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