Queryable Queryable Queryable Queryable Class

定义

提供一组用于查询实现 IQueryable<T> 的数据结构的 static(在 Visual Basic 中为 Shared)方法。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)输入IQueryable<T>的方法CreateQuery<TElement>(Expression)或方法。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该方法将对象类型IEnumerableIQueryable对象。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)

通过使用默认的相等比较器确定序列是否包含指定的元素。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.

适用于

另请参阅