Queryable Queryable Queryable Queryable Class

定義

提供一組 static (在 Visual Basic 中為 Shared) 方法,用於查詢實作 IQueryable<T> 的資料結構。Provides a set of static (Shared in Visual Basic) methods for querying data structures that implement IQueryable<T>.

public ref class Queryable abstract sealed
public static class Queryable
type Queryable = class
Public Module Queryable
繼承
QueryableQueryableQueryableQueryable

備註

Queryable類別中宣告的方法集合會提供標準查詢運算子的實作為, 以便查詢執行IQueryable<T>的資料來源。The set of methods declared in the Queryable class provides an implementation of the standard query operators for querying data sources that implement IQueryable<T>. 標準查詢運算子是遵循LINQLINQ模式的一般用途方法, 可讓您對任何中的資料進行「遍歷」、「篩選」和「投影」作業。以網路為基礎的程式設計語言。The standard query operators are general purpose methods that follow the LINQLINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language.

這個類別中的大部分方法都定義為擴充IQueryable<T>類型的擴充方法。The majority of the methods in this class are defined as extension methods that extend the IQueryable<T> type. 這表示在任何執行的物件上, IQueryable<T>都可以像實例方法一樣呼叫它們。This means they can be called like an instance method on any object that implements IQueryable<T>. 這些擴充IQueryable<T>的方法不會直接執行任何查詢。These methods that extend IQueryable<T> do not perform any querying directly. 相反地, 其功能是建立Expression物件, 這是代表累計查詢的運算式樹狀架構。Instead, their functionality is to build an Expression object, which is an expression tree that represents the cumulative query. 然後, 方法會將新的運算式樹狀架構傳遞Execute<TResult>(Expression)至方法CreateQuery<TElement>(Expression)或輸入IQueryable<T>的方法。The methods then pass the new expression tree to either the Execute<TResult>(Expression) method or the CreateQuery<TElement>(Expression) method of the input IQueryable<T>. 呼叫的方法取決於Queryable方法是否傳回單一值, 在此情況下Execute<TResult>(Expression)會呼叫或具有可列舉的結果, 在此情況下CreateQuery<TElement>(Expression)會呼叫。The method that is called depends on whether the Queryable method returns a singleton value, in which case Execute<TResult>(Expression) is called, or has enumerable results, in which case CreateQuery<TElement>(Expression) is called.

目標資料上實際的查詢執行是由實作為的類別IQueryable<T>來執行。The actual query execution on the target data is performed by a class that implements IQueryable<T>. 任何IQueryable<T>實作為的預期是執行Queryable由標準查詢運算子方法所建立的運算式樹狀架構, 相當於呼叫中Enumerable對應方法的結果。類別 (如果資料來源為IEnumerable<T>)。The expectation of any IQueryable<T> implementation is that the result of executing an expression tree that was constructed by a Queryable standard query operator method is equivalent to the result of calling the corresponding method in the Enumerable class, if the data source were an IEnumerable<T>.

除了IQueryable<T>在物件上運作的標準查詢運算子方法以外, 這個類別也包含方法, AsQueryable其會以物件的IEnumerable形式IQueryable來輸入物件。In addition to the standard query operator methods that operate on IQueryable<T> objects, this class also contains a method, AsQueryable, which types IEnumerable objects as IQueryable objects.

方法

Aggregate<TSource,TAccumulate,TResult>(IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate,TSource,TAccumulate>>, Expression<Func<TAccumulate,TResult>>) Aggregate<TSource,TAccumulate,TResult>(IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate,TSource,TAccumulate>>, Expression<Func<TAccumulate,TResult>>) Aggregate<TSource,TAccumulate,TResult>(IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate,TSource,TAccumulate>>, Expression<Func<TAccumulate,TResult>>) Aggregate<TSource,TAccumulate,TResult>(IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate,TSource,TAccumulate>>, Expression<Func<TAccumulate,TResult>>)

將累加函式套用到序列上。Applies an accumulator function over a sequence. 使用指定的值做為初始累加值,並使用指定的函式來選取結果值。The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value.

Aggregate<TSource,TAccumulate>(IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate,TSource,TAccumulate>>) Aggregate<TSource,TAccumulate>(IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate,TSource,TAccumulate>>) Aggregate<TSource,TAccumulate>(IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate,TSource,TAccumulate>>) Aggregate<TSource,TAccumulate>(IQueryable<TSource>, TAccumulate, Expression<Func<TAccumulate,TSource,TAccumulate>>)

將累加函式套用到序列上。Applies an accumulator function over a sequence. 使用指定的初始值做為初始累加值。The specified seed value is used as the initial accumulator value.

Aggregate<TSource>(IQueryable<TSource>, Expression<Func<TSource,TSource,TSource>>) Aggregate<TSource>(IQueryable<TSource>, Expression<Func<TSource,TSource,TSource>>) Aggregate<TSource>(IQueryable<TSource>, Expression<Func<TSource,TSource,TSource>>) Aggregate<TSource>(IQueryable<TSource>, Expression<Func<TSource,TSource,TSource>>)

將累加函式套用到序列上。Applies an accumulator function over a sequence.

All<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) All<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) All<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) All<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

判斷序列的所有項目是否全都符合條件。Determines whether all the elements of a sequence satisfy a condition.

Any<TSource>(IQueryable<TSource>) Any<TSource>(IQueryable<TSource>) Any<TSource>(IQueryable<TSource>) Any<TSource>(IQueryable<TSource>)

判斷序列是否包含任何項目。Determines whether a sequence contains any elements.

Any<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Any<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Any<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Any<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

判斷序列的任何項目是否符合條件。Determines whether any element of a sequence satisfies a condition.

Append<TSource>(IQueryable<TSource>, TSource) Append<TSource>(IQueryable<TSource>, TSource) Append<TSource>(IQueryable<TSource>, TSource) Append<TSource>(IQueryable<TSource>, TSource)
AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

AsQueryable<TElement>(IEnumerable<TElement>) AsQueryable<TElement>(IEnumerable<TElement>) AsQueryable<TElement>(IEnumerable<TElement>) AsQueryable<TElement>(IEnumerable<TElement>)

將泛型 IEnumerable<T> 轉換成泛型 IQueryable<T>Converts a generic IEnumerable<T> to a generic IQueryable<T>.

Average(IQueryable<Single>) Average(IQueryable<Single>) Average(IQueryable<Single>) Average(IQueryable<Single>)

計算 Single 值序列的平均值。Computes the average of a sequence of Single values.

Average(IQueryable<Nullable<Single>>) Average(IQueryable<Nullable<Single>>) Average(IQueryable<Nullable<Single>>) Average(IQueryable<Nullable<Single>>)

計算可為 Null 之 Single 值序列的平均值。Computes the average of a sequence of nullable Single values.

Average(IQueryable<Nullable<Int64>>) Average(IQueryable<Nullable<Int64>>) Average(IQueryable<Nullable<Int64>>) Average(IQueryable<Nullable<Int64>>)

計算可為 Null 之 Int64 值序列的平均值。Computes the average of a sequence of nullable Int64 values.

Average(IQueryable<Nullable<Double>>) Average(IQueryable<Nullable<Double>>) Average(IQueryable<Nullable<Double>>) Average(IQueryable<Nullable<Double>>)

計算可為 Null 之 Double 值序列的平均值。Computes the average of a sequence of nullable Double values.

Average(IQueryable<Nullable<Int32>>) Average(IQueryable<Nullable<Int32>>) Average(IQueryable<Nullable<Int32>>) Average(IQueryable<Nullable<Int32>>)

計算可為 Null 之 Int32 值序列的平均值。Computes the average of a sequence of nullable Int32 values.

Average(IQueryable<Int64>) Average(IQueryable<Int64>) Average(IQueryable<Int64>) Average(IQueryable<Int64>)

計算 Int64 值序列的平均值。Computes the average of a sequence of Int64 values.

Average(IQueryable<Int32>) Average(IQueryable<Int32>) Average(IQueryable<Int32>) Average(IQueryable<Int32>)

計算 Int32 值序列的平均值。Computes the average of a sequence of Int32 values.

Average(IQueryable<Double>) Average(IQueryable<Double>) Average(IQueryable<Double>) Average(IQueryable<Double>)

計算 Double 值序列的平均值。Computes the average of a sequence of Double values.

Average(IQueryable<Decimal>) Average(IQueryable<Decimal>) Average(IQueryable<Decimal>) Average(IQueryable<Decimal>)

計算 Decimal 值序列的平均值。Computes the average of a sequence of Decimal values.

Average(IQueryable<Nullable<Decimal>>) Average(IQueryable<Nullable<Decimal>>) Average(IQueryable<Nullable<Decimal>>) Average(IQueryable<Nullable<Decimal>>)

計算可為 Null 之 Decimal 值序列的平均值。Computes the average of a sequence of nullable Decimal values.

Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Single>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Single>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Single>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Single>>)

計算在輸入序列中各項目上叫用投影函式後所取得之 Single 值序列的平均值。Computes the average of a sequence of Single values that is obtained by invoking a projection function on each element of the input sequence.

Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Single>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Single>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Single>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Single>>>)

計算在輸入序列中各項目上叫用投影函式後所取得可為 Null 之 Single 值序列的平均值。Computes the average of a sequence of nullable Single values that is obtained by invoking a projection function on each element of the input sequence.

Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int64>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int64>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int64>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int64>>>)

計算在輸入序列中各項目上叫用投影函式後所取得可為 Null 之 Int64 值序列的平均值。Computes the average of a sequence of nullable Int64 values that is obtained by invoking a projection function on each element of the input sequence.

Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int32>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int32>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int32>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int32>>>)

計算在輸入序列中各項目上叫用投影函式後所取得可為 Null 之 Int32 值序列的平均值。Computes the average of a sequence of nullable Int32 values that is obtained by invoking a projection function on each element of the input sequence.

Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Double>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Double>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Double>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Double>>>)

計算在輸入序列中各項目上叫用投影函式後所取得可為 Null 之 Double 值序列的平均值。Computes the average of a sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence.

Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int64>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int64>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int64>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int64>>)

計算在輸入序列中各項目上叫用投影函式後所取得之 Int64 值序列的平均值。Computes the average of a sequence of Int64 values that is obtained by invoking a projection function on each element of the input sequence.

Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32>>)

計算在輸入序列中各項目上叫用投影函式後所取得之 Int32 值序列的平均值。Computes the average of a sequence of Int32 values that is obtained by invoking a projection function on each element of the input sequence.

Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Double>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Double>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Double>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Double>>)

計算在輸入序列中各項目上叫用投影函式後所取得之 Double 值序列的平均值。Computes the average of a sequence of Double values that is obtained by invoking a projection function on each element of the input sequence.

Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Decimal>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Decimal>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Decimal>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Decimal>>)

計算在輸入序列中各項目上叫用投影函式後所取得之 Decimal 值序列的平均值。Computes the average of a sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence.

Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Decimal>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Decimal>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Decimal>>>) Average<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Decimal>>>)

計算在輸入序列中各項目上叫用投影函式後所取得可為 Null 之 Decimal 值序列的平均值。Computes the average of a sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence.

Cast<TResult>(IQueryable) Cast<TResult>(IQueryable) Cast<TResult>(IQueryable) Cast<TResult>(IQueryable)

IQueryable 的項目轉換為指定的型別。Converts the elements of an IQueryable to the specified type.

Concat<TSource>(IQueryable<TSource>, IEnumerable<TSource>) Concat<TSource>(IQueryable<TSource>, IEnumerable<TSource>) Concat<TSource>(IQueryable<TSource>, IEnumerable<TSource>) Concat<TSource>(IQueryable<TSource>, IEnumerable<TSource>)

串連兩個序列。Concatenates two sequences.

Contains<TSource>(IQueryable<TSource>, TSource, IEqualityComparer<TSource>) Contains<TSource>(IQueryable<TSource>, TSource, IEqualityComparer<TSource>) Contains<TSource>(IQueryable<TSource>, TSource, IEqualityComparer<TSource>) Contains<TSource>(IQueryable<TSource>, TSource, IEqualityComparer<TSource>)

使用指定的 IEqualityComparer<T> 來判斷序列是否包含指定的項目。Determines whether a sequence contains a specified element by using a specified IEqualityComparer<T>.

Contains<TSource>(IQueryable<TSource>, TSource) Contains<TSource>(IQueryable<TSource>, TSource) Contains<TSource>(IQueryable<TSource>, TSource) Contains<TSource>(IQueryable<TSource>, TSource)

使用預設的相等比較子 (Comparer) 來判斷序列是否包含指定的項目。Determines whether a sequence contains a specified element by using the default equality comparer.

Count<TSource>(IQueryable<TSource>) Count<TSource>(IQueryable<TSource>) Count<TSource>(IQueryable<TSource>) Count<TSource>(IQueryable<TSource>)

傳回序列中的項目數。Returns the number of elements in a sequence.

Count<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Count<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Count<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Count<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

傳回指定之序列中符合條件的項目數目。Returns the number of elements in the specified sequence that satisfies a condition.

DefaultIfEmpty<TSource>(IQueryable<TSource>) DefaultIfEmpty<TSource>(IQueryable<TSource>) DefaultIfEmpty<TSource>(IQueryable<TSource>) DefaultIfEmpty<TSource>(IQueryable<TSource>)

傳回指定之序列的項目;如果序列是空的,則傳回單一集合中型別參數的預設值。Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty.

DefaultIfEmpty<TSource>(IQueryable<TSource>, TSource) DefaultIfEmpty<TSource>(IQueryable<TSource>, TSource) DefaultIfEmpty<TSource>(IQueryable<TSource>, TSource) DefaultIfEmpty<TSource>(IQueryable<TSource>, TSource)

傳回指定之序列的項目;如果序列是空的,則傳回單一集合中型別參數的預設值。Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty.

Distinct<TSource>(IQueryable<TSource>) Distinct<TSource>(IQueryable<TSource>) Distinct<TSource>(IQueryable<TSource>) Distinct<TSource>(IQueryable<TSource>)

使用預設的相等比較子來比較值,以便從序列傳回獨特的項目。Returns distinct elements from a sequence by using the default equality comparer to compare values.

Distinct<TSource>(IQueryable<TSource>, IEqualityComparer<TSource>) Distinct<TSource>(IQueryable<TSource>, IEqualityComparer<TSource>) Distinct<TSource>(IQueryable<TSource>, IEqualityComparer<TSource>) Distinct<TSource>(IQueryable<TSource>, IEqualityComparer<TSource>)

使用指定的 IEqualityComparer<T> 來比較值,以便從序列傳回獨特的項目。Returns distinct elements from a sequence by using a specified IEqualityComparer<T> to compare values.

ElementAt<TSource>(IQueryable<TSource>, Int32) ElementAt<TSource>(IQueryable<TSource>, Int32) ElementAt<TSource>(IQueryable<TSource>, Int32) ElementAt<TSource>(IQueryable<TSource>, Int32)

傳回位於序列中指定索引處的項目。Returns the element at a specified index in a sequence.

ElementAtOrDefault<TSource>(IQueryable<TSource>, Int32) ElementAtOrDefault<TSource>(IQueryable<TSource>, Int32) ElementAtOrDefault<TSource>(IQueryable<TSource>, Int32) ElementAtOrDefault<TSource>(IQueryable<TSource>, Int32)

傳回位於序列中指定索引處的元素;如果索引超出範圍,則傳回預設值。Returns the element at a specified index in a sequence or a default value if the index is out of range.

Except<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) Except<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) Except<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) Except<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

使用指定的 IEqualityComparer<T> 來比較值,以便產生兩個序列的差異。Produces the set difference of two sequences by using the specified IEqualityComparer<T> to compare values.

Except<TSource>(IQueryable<TSource>, IEnumerable<TSource>) Except<TSource>(IQueryable<TSource>, IEnumerable<TSource>) Except<TSource>(IQueryable<TSource>, IEnumerable<TSource>) Except<TSource>(IQueryable<TSource>, IEnumerable<TSource>)

使用預設相等比較子來比較值,以便產生兩個序列的差異。Produces the set difference of two sequences by using the default equality comparer to compare values.

First<TSource>(IQueryable<TSource>) First<TSource>(IQueryable<TSource>) First<TSource>(IQueryable<TSource>) First<TSource>(IQueryable<TSource>)

傳回序列的第一個項目。Returns the first element of a sequence.

First<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) First<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) First<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) First<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

傳回序列中符合指定之條件的第一個項目。Returns the first element of a sequence that satisfies a specified condition.

FirstOrDefault<TSource>(IQueryable<TSource>) FirstOrDefault<TSource>(IQueryable<TSource>) FirstOrDefault<TSource>(IQueryable<TSource>) FirstOrDefault<TSource>(IQueryable<TSource>)

傳回序列的第一個元素;如果序列中沒有包含任何元素,則傳回預設值。Returns the first element of a sequence, or a default value if the sequence contains no elements.

FirstOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) FirstOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) FirstOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) FirstOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

傳回序列中符合指定之條件的第一個項目;如果找不到這類項目,則傳回預設值。Returns the first element of a sequence that satisfies a specified condition or a default value if no such element is found.

GroupBy<TSource,TKey,TElement,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>, Expression<Func<TKey,IEnumerable<TElement>,TResult>>, IEqualityComparer<TKey>) GroupBy<TSource,TKey,TElement,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>, Expression<Func<TKey,IEnumerable<TElement>,TResult>>, IEqualityComparer<TKey>) GroupBy<TSource,TKey,TElement,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>, Expression<Func<TKey,IEnumerable<TElement>,TResult>>, IEqualityComparer<TKey>) GroupBy<TSource,TKey,TElement,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>, Expression<Func<TKey,IEnumerable<TElement>,TResult>>, IEqualityComparer<TKey>)

依據指定的索引鍵選取器函式來群組序列的項目,並從每個群組及其索引鍵建立結果值。Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. 索引鍵是使用指定的比較子來進行比較,而每個群組的項目則都是利用指定的函式進行投影。Keys are compared by using a specified comparer and the elements of each group are projected by using a specified function.

GroupBy<TSource,TKey,TElement,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>, Expression<Func<TKey,IEnumerable<TElement>,TResult>>) GroupBy<TSource,TKey,TElement,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>, Expression<Func<TKey,IEnumerable<TElement>,TResult>>) GroupBy<TSource,TKey,TElement,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>, Expression<Func<TKey,IEnumerable<TElement>,TResult>>) GroupBy<TSource,TKey,TElement,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>, Expression<Func<TKey,IEnumerable<TElement>,TResult>>)

依據指定的索引鍵選取器函式來群組序列的項目,並從每個群組及其索引鍵建立結果值。Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. 每個群組的項目都是利用指定的函式進行投影。The elements of each group are projected by using a specified function.

GroupBy<TSource,TKey,TElement>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>) GroupBy<TSource,TKey,TElement>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>) GroupBy<TSource,TKey,TElement>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>) GroupBy<TSource,TKey,TElement>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>)

依據指定的索引鍵選取器函式來群組序列的項目,並使用指定的函式來投影每個群組的項目。Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.

GroupBy<TSource,TKey,TElement>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>, IEqualityComparer<TKey>) GroupBy<TSource,TKey,TElement>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>, IEqualityComparer<TKey>) GroupBy<TSource,TKey,TElement>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>, IEqualityComparer<TKey>) GroupBy<TSource,TKey,TElement>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TSource,TElement>>, IEqualityComparer<TKey>)

使用指定的函式來群組序列的項目並投影每個群組的項目。Groups the elements of a sequence and projects the elements for each group by using a specified function. 索引鍵值是使用指定的比較子來進行比較。Key values are compared by using a specified comparer.

GroupBy<TSource,TKey,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TKey,IEnumerable<TSource>,TResult>>) GroupBy<TSource,TKey,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TKey,IEnumerable<TSource>,TResult>>) GroupBy<TSource,TKey,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TKey,IEnumerable<TSource>,TResult>>) GroupBy<TSource,TKey,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TKey,IEnumerable<TSource>,TResult>>)

依據指定的索引鍵選取器函式來群組序列的項目,並從每個群組及其索引鍵建立結果值。Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.

GroupBy<TSource,TKey,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TKey,IEnumerable<TSource>,TResult>>, IEqualityComparer<TKey>) GroupBy<TSource,TKey,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TKey,IEnumerable<TSource>,TResult>>, IEqualityComparer<TKey>) GroupBy<TSource,TKey,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TKey,IEnumerable<TSource>,TResult>>, IEqualityComparer<TKey>) GroupBy<TSource,TKey,TResult>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, Expression<Func<TKey,IEnumerable<TSource>,TResult>>, IEqualityComparer<TKey>)

依據指定的索引鍵選取器函式來群組序列的項目,並從每個群組及其索引鍵建立結果值。Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. 索引鍵是使用指定的比較子來進行比較。Keys are compared by using a specified comparer.

GroupBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IEqualityComparer<TKey>) GroupBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IEqualityComparer<TKey>) GroupBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IEqualityComparer<TKey>) GroupBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IEqualityComparer<TKey>)

依據指定的索引鍵選取器函式來群組序列的項目,並使用指定的比較子來比較索引鍵。Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.

GroupBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) GroupBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) GroupBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) GroupBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>)

依據指定的索引鍵選擇器函式來群組序列的項目。Groups the elements of a sequence according to a specified key selector function.

GroupJoin<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,IEnumerable<TInner>,TResult>>) GroupJoin<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,IEnumerable<TInner>,TResult>>) GroupJoin<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,IEnumerable<TInner>,TResult>>) GroupJoin<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,IEnumerable<TInner>,TResult>>)

根據索引鍵相等與否,將兩個序列的項目相互關聯,並群組產生的結果。Correlates the elements of two sequences based on key equality and groups the results. 預設的相等比較子是用於比較索引鍵。The default equality comparer is used to compare keys.

GroupJoin<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,IEnumerable<TInner>,TResult>>, IEqualityComparer<TKey>) GroupJoin<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,IEnumerable<TInner>,TResult>>, IEqualityComparer<TKey>) GroupJoin<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,IEnumerable<TInner>,TResult>>, IEqualityComparer<TKey>) GroupJoin<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,IEnumerable<TInner>,TResult>>, IEqualityComparer<TKey>)

根據索引鍵相等與否,將兩個序列的項目相互關聯,並群組產生的結果。Correlates the elements of two sequences based on key equality and groups the results. 指定的 IEqualityComparer<T> 是用於比較索引鍵。A specified IEqualityComparer<T> is used to compare keys.

Intersect<TSource>(IQueryable<TSource>, IEnumerable<TSource>) Intersect<TSource>(IQueryable<TSource>, IEnumerable<TSource>) Intersect<TSource>(IQueryable<TSource>, IEnumerable<TSource>) Intersect<TSource>(IQueryable<TSource>, IEnumerable<TSource>)

使用預設相等比較子來比較值,以便產生兩個序列的交集。Produces the set intersection of two sequences by using the default equality comparer to compare values.

Intersect<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) Intersect<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) Intersect<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) Intersect<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

使用指定的 IEqualityComparer<T> 來比較值,以便產生兩個序列的交集。Produces the set intersection of two sequences by using the specified IEqualityComparer<T> to compare values.

Join<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,TInner,TResult>>) Join<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,TInner,TResult>>) Join<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,TInner,TResult>>) Join<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,TInner,TResult>>)

根據相符索引鍵,將兩個序列的項目相互關聯。Correlates the elements of two sequences based on matching keys. 預設的相等比較子是用於比較索引鍵。The default equality comparer is used to compare keys.

Join<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,TInner,TResult>>, IEqualityComparer<TKey>) Join<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,TInner,TResult>>, IEqualityComparer<TKey>) Join<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,TInner,TResult>>, IEqualityComparer<TKey>) Join<TOuter,TInner,TKey,TResult>(IQueryable<TOuter>, IEnumerable<TInner>, Expression<Func<TOuter,TKey>>, Expression<Func<TInner,TKey>>, Expression<Func<TOuter,TInner,TResult>>, IEqualityComparer<TKey>)

根據相符索引鍵,將兩個序列的項目相互關聯。Correlates the elements of two sequences based on matching keys. 指定的 IEqualityComparer<T> 是用於比較索引鍵。A specified IEqualityComparer<T> is used to compare keys.

Last<TSource>(IQueryable<TSource>) Last<TSource>(IQueryable<TSource>) Last<TSource>(IQueryable<TSource>) Last<TSource>(IQueryable<TSource>)

傳回序列中的最後一個項目。Returns the last element in a sequence.

Last<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Last<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Last<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Last<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

傳回序列中符合指定之條件的最後一個元素。Returns the last element of a sequence that satisfies a specified condition.

LastOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) LastOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) LastOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) LastOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

傳回序列中符合條件的最後一個元素;如果找不到這類元素,則傳回預設值。Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.

LastOrDefault<TSource>(IQueryable<TSource>) LastOrDefault<TSource>(IQueryable<TSource>) LastOrDefault<TSource>(IQueryable<TSource>) LastOrDefault<TSource>(IQueryable<TSource>)

傳回序列中的最後一個項目;如果序列中沒有包含任何項目,則傳回預設值。Returns the last element in a sequence, or a default value if the sequence contains no elements.

LongCount<TSource>(IQueryable<TSource>) LongCount<TSource>(IQueryable<TSource>) LongCount<TSource>(IQueryable<TSource>) LongCount<TSource>(IQueryable<TSource>)

傳回代表序列中項目總數的 Int64Returns an Int64 that represents the total number of elements in a sequence.

LongCount<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) LongCount<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) LongCount<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) LongCount<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

傳回 Int64,其代表序列中符合條件的項目數目。Returns an Int64 that represents the number of elements in a sequence that satisfy a condition.

Max<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>) Max<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>) Max<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>) Max<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>)

對泛型 IQueryable<T> 的每個項目叫用投影函式,並傳回最大的結果值。Invokes a projection function on each element of a generic IQueryable<T> and returns the maximum resulting value.

Max<TSource>(IQueryable<TSource>) Max<TSource>(IQueryable<TSource>) Max<TSource>(IQueryable<TSource>) Max<TSource>(IQueryable<TSource>)

傳回泛型 IQueryable<T> 中的最大值。Returns the maximum value in a generic IQueryable<T>.

Min<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>) Min<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>) Min<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>) Min<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>)

對泛型 IQueryable<T> 的每個項目叫用投影函式,並傳回最小的結果值。Invokes a projection function on each element of a generic IQueryable<T> and returns the minimum resulting value.

Min<TSource>(IQueryable<TSource>) Min<TSource>(IQueryable<TSource>) Min<TSource>(IQueryable<TSource>) Min<TSource>(IQueryable<TSource>)

傳回泛型 IQueryable<T> 的最小值。Returns the minimum value of a generic IQueryable<T>.

OfType<TResult>(IQueryable) OfType<TResult>(IQueryable) OfType<TResult>(IQueryable) OfType<TResult>(IQueryable)

根據指定的型別來篩選 IQueryable 的項目。Filters the elements of an IQueryable based on a specified type.

OrderBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) OrderBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) OrderBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) OrderBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>)

使用指定的比較子,依遞增順序排序序列中的項目。Sorts the elements of a sequence in ascending order by using a specified comparer.

OrderBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) OrderBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) OrderBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) OrderBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>)

依據索引鍵,按遞增順序排序序列中的項目。Sorts the elements of a sequence in ascending order according to a key.

OrderByDescending<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) OrderByDescending<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) OrderByDescending<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) OrderByDescending<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>)

依據索引鍵,按遞減順序排序序列中的項目。Sorts the elements of a sequence in descending order according to a key.

OrderByDescending<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) OrderByDescending<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) OrderByDescending<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) OrderByDescending<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>)

使用指定的比較子,依遞減順序排序序列中的項目。Sorts the elements of a sequence in descending order by using a specified comparer.

Prepend<TSource>(IQueryable<TSource>, TSource) Prepend<TSource>(IQueryable<TSource>, TSource) Prepend<TSource>(IQueryable<TSource>, TSource) Prepend<TSource>(IQueryable<TSource>, TSource)
Reverse<TSource>(IQueryable<TSource>) Reverse<TSource>(IQueryable<TSource>) Reverse<TSource>(IQueryable<TSource>) Reverse<TSource>(IQueryable<TSource>)

反轉序列中項目的排序方向。Inverts the order of the elements in a sequence.

Select<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,Int32,TResult>>) Select<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,Int32,TResult>>) Select<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,Int32,TResult>>) Select<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,Int32,TResult>>)

透過加入項目的索引,將序列的每個項目投影成新的表單。Projects each element of a sequence into a new form by incorporating the element's index.

Select<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>) Select<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>) Select<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>) Select<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>)

將序列的每個元素規劃成一個新的表單。Projects each element of a sequence into a new form.

SelectMany<TSource,TCollection,TResult>(IQueryable<TSource>, Expression<Func<TSource,Int32,IEnumerable<TCollection>>>, Expression<Func<TSource,TCollection,TResult>>) SelectMany<TSource,TCollection,TResult>(IQueryable<TSource>, Expression<Func<TSource,Int32,IEnumerable<TCollection>>>, Expression<Func<TSource,TCollection,TResult>>) SelectMany<TSource,TCollection,TResult>(IQueryable<TSource>, Expression<Func<TSource,Int32,IEnumerable<TCollection>>>, Expression<Func<TSource,TCollection,TResult>>) SelectMany<TSource,TCollection,TResult>(IQueryable<TSource>, Expression<Func<TSource,Int32,IEnumerable<TCollection>>>, Expression<Func<TSource,TCollection,TResult>>)

將序列的每個項目都投影成 IEnumerable<T>,以合併產生該項目之來源項目的索引。Projects each element of a sequence to an IEnumerable<T> that incorporates the index of the source element that produced it. 接著對各中繼序列的每個項目叫用結果選取器函式,然後將產生的值合併成單一的一維序列並傳回。A result selector function is invoked on each element of each intermediate sequence, and the resulting values are combined into a single, one-dimensional sequence and returned.

SelectMany<TSource,TCollection,TResult>(IQueryable<TSource>, Expression<Func<TSource,IEnumerable<TCollection>>>, Expression<Func<TSource,TCollection,TResult>>) SelectMany<TSource,TCollection,TResult>(IQueryable<TSource>, Expression<Func<TSource,IEnumerable<TCollection>>>, Expression<Func<TSource,TCollection,TResult>>) SelectMany<TSource,TCollection,TResult>(IQueryable<TSource>, Expression<Func<TSource,IEnumerable<TCollection>>>, Expression<Func<TSource,TCollection,TResult>>) SelectMany<TSource,TCollection,TResult>(IQueryable<TSource>, Expression<Func<TSource,IEnumerable<TCollection>>>, Expression<Func<TSource,TCollection,TResult>>)

將序列的每個項目投影成 IEnumerable<T>,並在其中的每個項目上叫用結果選取器函式。Projects each element of a sequence to an IEnumerable<T> and invokes a result selector function on each element therein. 每個中繼序列產生的值都會合併成單一的一維序列,然後再傳回。The resulting values from each intermediate sequence are combined into a single, one-dimensional sequence and returned.

SelectMany<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,Int32,IEnumerable<TResult>>>) SelectMany<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,Int32,IEnumerable<TResult>>>) SelectMany<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,Int32,IEnumerable<TResult>>>) SelectMany<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,Int32,IEnumerable<TResult>>>)

將序列的每個項目都投影成 IEnumerable<T>,並將產生的序列合併成一個序列。Projects each element of a sequence to an IEnumerable<T> and combines the resulting sequences into one sequence. 各來源項目的索引是在該項目的投影表單中使用。The index of each source element is used in the projected form of that element.

SelectMany<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,IEnumerable<TResult>>>) SelectMany<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,IEnumerable<TResult>>>) SelectMany<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,IEnumerable<TResult>>>) SelectMany<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,IEnumerable<TResult>>>)

將序列的每個項目都投影成 IEnumerable<T>,並將產生的序列合併成一個序列。Projects each element of a sequence to an IEnumerable<T> and combines the resulting sequences into one sequence.

SequenceEqual<TSource>(IQueryable<TSource>, IEnumerable<TSource>) SequenceEqual<TSource>(IQueryable<TSource>, IEnumerable<TSource>) SequenceEqual<TSource>(IQueryable<TSource>, IEnumerable<TSource>) SequenceEqual<TSource>(IQueryable<TSource>, IEnumerable<TSource>)

使用預設相等比較子來比較項目,以判斷兩個序列是否相等。Determines whether two sequences are equal by using the default equality comparer to compare elements.

SequenceEqual<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) SequenceEqual<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

使用指定的 IEqualityComparer<T> 來比較項目,以判斷兩個序列是否相等。Determines whether two sequences are equal by using a specified IEqualityComparer<T> to compare elements.

Single<TSource>(IQueryable<TSource>) Single<TSource>(IQueryable<TSource>) Single<TSource>(IQueryable<TSource>) Single<TSource>(IQueryable<TSource>)

傳回序列的唯一一個元素,如果序列中不是正好一個元素,則擲回例外狀況。Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.

Single<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Single<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Single<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Single<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

傳回序列中符合指定之條件的唯一一個元素,如果有一個以上這類元素,則擲回例外狀況。Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.

SingleOrDefault<TSource>(IQueryable<TSource>) SingleOrDefault<TSource>(IQueryable<TSource>) SingleOrDefault<TSource>(IQueryable<TSource>) SingleOrDefault<TSource>(IQueryable<TSource>)

傳回序列的唯一一個項目,如果序列是空白,則為預設值,如果序列中有一個以上的項目,這個方法就會擲回例外狀況。Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.

SingleOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) SingleOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) SingleOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) SingleOrDefault<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

傳回序列中符合指定之條件的唯一一個元素,如果沒有這類元素,則為預設值,如果有一個以上的元素符合條件,這個方法就會擲回例外狀況。Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.

Skip<TSource>(IQueryable<TSource>, Int32) Skip<TSource>(IQueryable<TSource>, Int32) Skip<TSource>(IQueryable<TSource>, Int32) Skip<TSource>(IQueryable<TSource>, Int32)

略過序列中指定的項目數目,然後傳回其餘項目。Bypasses a specified number of elements in a sequence and then returns the remaining elements.

SkipLast<TSource>(IQueryable<TSource>, Int32) SkipLast<TSource>(IQueryable<TSource>, Int32) SkipLast<TSource>(IQueryable<TSource>, Int32) SkipLast<TSource>(IQueryable<TSource>, Int32)
SkipWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) SkipWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) SkipWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) SkipWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

只要指定的條件為 true,便略過序列中的項目,然後傳回其餘項目。Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.

SkipWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32,Boolean>>) SkipWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32,Boolean>>) SkipWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32,Boolean>>) SkipWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32,Boolean>>)

只要指定的條件為 true,便略過序列中的項目,然後傳回其餘項目。Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. 項目的索引是用於述詞功能的邏輯中。The element's index is used in the logic of the predicate function.

Sum(IQueryable<Single>) Sum(IQueryable<Single>) Sum(IQueryable<Single>) Sum(IQueryable<Single>)

計算 Single 值序列的總和。Computes the sum of a sequence of Single values.

Sum(IQueryable<Nullable<Single>>) Sum(IQueryable<Nullable<Single>>) Sum(IQueryable<Nullable<Single>>) Sum(IQueryable<Nullable<Single>>)

計算可為 Null 之 Single 值序列的總和。Computes the sum of a sequence of nullable Single values.

Sum(IQueryable<Nullable<Int64>>) Sum(IQueryable<Nullable<Int64>>) Sum(IQueryable<Nullable<Int64>>) Sum(IQueryable<Nullable<Int64>>)

計算可為 Null 之 Int64 值序列的總和。Computes the sum of a sequence of nullable Int64 values.

Sum(IQueryable<Nullable<Int32>>) Sum(IQueryable<Nullable<Int32>>) Sum(IQueryable<Nullable<Int32>>) Sum(IQueryable<Nullable<Int32>>)

計算可為 Null 之 Int32 值序列的總和。Computes the sum of a sequence of nullable Int32 values.

Sum(IQueryable<Nullable<Double>>) Sum(IQueryable<Nullable<Double>>) Sum(IQueryable<Nullable<Double>>) Sum(IQueryable<Nullable<Double>>)

計算可為 Null 之 Double 值序列的總和。Computes the sum of a sequence of nullable Double values.

Sum(IQueryable<Int32>) Sum(IQueryable<Int32>) Sum(IQueryable<Int32>) Sum(IQueryable<Int32>)

計算 Int32 值序列的總和。Computes the sum of a sequence of Int32 values.

Sum(IQueryable<Int64>) Sum(IQueryable<Int64>) Sum(IQueryable<Int64>) Sum(IQueryable<Int64>)

計算 Int64 值序列的總和。Computes the sum of a sequence of Int64 values.

Sum(IQueryable<Nullable<Decimal>>) Sum(IQueryable<Nullable<Decimal>>) Sum(IQueryable<Nullable<Decimal>>) Sum(IQueryable<Nullable<Decimal>>)

計算可為 Null 之 Decimal 值序列的總和。Computes the sum of a sequence of nullable Decimal values.

Sum(IQueryable<Double>) Sum(IQueryable<Double>) Sum(IQueryable<Double>) Sum(IQueryable<Double>)

計算 Double 值序列的總和。Computes the sum of a sequence of Double values.

Sum(IQueryable<Decimal>) Sum(IQueryable<Decimal>) Sum(IQueryable<Decimal>) Sum(IQueryable<Decimal>)

計算 Decimal 值序列的總和。Computes the sum of a sequence of Decimal values.

Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Single>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Single>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Single>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Single>>>)

計算在輸入序列中各項目上叫用投影函式後所取得可為 Null 之 Single 值序列的總和。Computes the sum of the sequence of nullable Single values that is obtained by invoking a projection function on each element of the input sequence.

Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int64>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int64>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int64>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int64>>>)

計算在輸入序列中各項目上叫用投影函式後所取得可為 Null 之 Int64 值序列的總和。Computes the sum of the sequence of nullable Int64 values that is obtained by invoking a projection function on each element of the input sequence.

Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int32>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int32>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int32>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Int32>>>)

計算在輸入序列中各項目上叫用投影函式後所取得可為 Null 之 Int32 值序列的總和。Computes the sum of the sequence of nullable Int32 values that is obtained by invoking a projection function on each element of the input sequence.

Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Double>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Double>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Double>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Double>>>)

計算在輸入序列中各項目上叫用投影函式後所取得可為 Null 之 Double 值序列的總和。Computes the sum of the sequence of nullable Double values that is obtained by invoking a projection function on each element of the input sequence.

Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Single>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Single>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Single>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Single>>)

計算在輸入序列中各項目上叫用投影函式後所取得之 Single 值序列的總和。Computes the sum of the sequence of Single values that is obtained by invoking a projection function on each element of the input sequence.

Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int64>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int64>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int64>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int64>>)

計算在輸入序列中各項目上叫用投影函式後所取得之 Int64 值序列的總和。Computes the sum of the sequence of Int64 values that is obtained by invoking a projection function on each element of the input sequence.

Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32>>)

計算在輸入序列中各項目上叫用投影函式後所取得之 Int32 值序列的總和。Computes the sum of the sequence of Int32 values that is obtained by invoking a projection function on each element of the input sequence.

Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Double>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Double>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Double>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Double>>)

計算在輸入序列中各項目上叫用投影函式後所取得之 Double 值序列的總和。Computes the sum of the sequence of Double values that is obtained by invoking a projection function on each element of the input sequence.

Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Decimal>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Decimal>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Decimal>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Decimal>>)

計算在輸入序列中各項目上叫用投影函式後所取得之 Decimal 值序列的總和。Computes the sum of the sequence of Decimal values that is obtained by invoking a projection function on each element of the input sequence.

Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Decimal>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Decimal>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Decimal>>>) Sum<TSource>(IQueryable<TSource>, Expression<Func<TSource,Nullable<Decimal>>>)

計算在輸入序列中各項目上叫用投影函式後所取得可為 Null 之 Decimal 值序列的總和。Computes the sum of the sequence of nullable Decimal values that is obtained by invoking a projection function on each element of the input sequence.

Take<TSource>(IQueryable<TSource>, Int32) Take<TSource>(IQueryable<TSource>, Int32) Take<TSource>(IQueryable<TSource>, Int32) Take<TSource>(IQueryable<TSource>, Int32)

從序列開頭傳回指定的連續項目數目。Returns a specified number of contiguous elements from the start of a sequence.

TakeLast<TSource>(IQueryable<TSource>, Int32) TakeLast<TSource>(IQueryable<TSource>, Int32) TakeLast<TSource>(IQueryable<TSource>, Int32) TakeLast<TSource>(IQueryable<TSource>, Int32)
TakeWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) TakeWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) TakeWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) TakeWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

只要指定的條件為 true,就會傳回序列中的項目。Returns elements from a sequence as long as a specified condition is true.

TakeWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32,Boolean>>) TakeWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32,Boolean>>) TakeWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32,Boolean>>) TakeWhile<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32,Boolean>>)

只要指定的條件為 true,就會傳回序列中的項目。Returns elements from a sequence as long as a specified condition is true. 項目的索引是用於述詞功能的邏輯中。The element's index is used in the logic of the predicate function.

ThenBy<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) ThenBy<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) ThenBy<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) ThenBy<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>)

使用指定的比較子,依遞增順序執行序列中項目的後續排序作業。Performs a subsequent ordering of the elements in a sequence in ascending order by using a specified comparer.

ThenBy<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>) ThenBy<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>) ThenBy<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>) ThenBy<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>)

依據索引鍵,按遞增順序執行序列中項目的後續排序作業。Performs a subsequent ordering of the elements in a sequence in ascending order according to a key.

ThenByDescending<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>) ThenByDescending<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>) ThenByDescending<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>) ThenByDescending<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>)

依據索引鍵,按遞減順序執行序列中項目的後續排序作業。Performs a subsequent ordering of the elements in a sequence in descending order, according to a key.

ThenByDescending<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) ThenByDescending<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) ThenByDescending<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) ThenByDescending<TSource,TKey>(IOrderedQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>)

使用指定的比較子,依遞減順序執行序列中項目的後續排序作業。Performs a subsequent ordering of the elements in a sequence in descending order by using a specified comparer.

Union<TSource>(IQueryable<TSource>, IEnumerable<TSource>) Union<TSource>(IQueryable<TSource>, IEnumerable<TSource>) Union<TSource>(IQueryable<TSource>, IEnumerable<TSource>) Union<TSource>(IQueryable<TSource>, IEnumerable<TSource>)

使用預設相等比較值來比較值,以便產生兩個序列的集合等位。Produces the set union of two sequences by using the default equality comparer.

Union<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) Union<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) Union<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) Union<TSource>(IQueryable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

使用指定的 IEqualityComparer<T> 產生兩個序列的集合等位。Produces the set union of two sequences by using a specified IEqualityComparer<T>.

Where<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Where<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Where<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>) Where<TSource>(IQueryable<TSource>, Expression<Func<TSource,Boolean>>)

根據述詞來篩選值序列。Filters a sequence of values based on a predicate.

Where<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32,Boolean>>) Where<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32,Boolean>>) Where<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32,Boolean>>) Where<TSource>(IQueryable<TSource>, Expression<Func<TSource,Int32,Boolean>>)

根據述詞來篩選值序列。Filters a sequence of values based on a predicate. 述詞函式的邏輯中使用各項目的索引。Each element's index is used in the logic of the predicate function.

Zip<TFirst,TSecond,TResult>(IQueryable<TFirst>, IEnumerable<TSecond>, Expression<Func<TFirst,TSecond,TResult>>) Zip<TFirst,TSecond,TResult>(IQueryable<TFirst>, IEnumerable<TSecond>, Expression<Func<TFirst,TSecond,TResult>>) Zip<TFirst,TSecond,TResult>(IQueryable<TFirst>, IEnumerable<TSecond>, Expression<Func<TFirst,TSecond,TResult>>) Zip<TFirst,TSecond,TResult>(IQueryable<TFirst>, IEnumerable<TSecond>, Expression<Func<TFirst,TSecond,TResult>>)

使用指定的述詞函式來合併兩個序列。Merges two sequences by using the specified predicate function.

Zip<TFirst,TSecond>(IQueryable<TFirst>, IEnumerable<TSecond>) Zip<TFirst,TSecond>(IQueryable<TFirst>, IEnumerable<TSecond>) Zip<TFirst,TSecond>(IQueryable<TFirst>, IEnumerable<TSecond>) Zip<TFirst,TSecond>(IQueryable<TFirst>, IEnumerable<TSecond>)

從兩個指定序列中的元素產生一系列元組。Produces a sequence of tuples with elements from the two specified sequences.

適用於

另請參閱