QueryableExtensions.Take<TSource> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a specified number of contiguous elements from the start of a sequence.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public static System.Linq.IQueryable<TSource> Take<TSource> (this System.Linq.IQueryable<TSource> source, System.Linq.Expressions.Expression<Func<int>> countAccessor);
static member Take : System.Linq.IQueryable<'Source> * System.Linq.Expressions.Expression<Func<int>> -> System.Linq.IQueryable<'Source>
<Extension()>
Public Function Take(Of TSource) (source As IQueryable(Of TSource), countAccessor As Expression(Of Func(Of Integer))) As IQueryable(Of TSource)
Type Parameters
- TSource
The type of the elements of source.
Parameters
- source
- IQueryable<TSource>
The sequence to return elements from.
- countAccessor
- Expression<Func<Int32>>
An expression that evaluates to the number of elements to return.
Returns
IQueryable<TSource>
A sequence that contains the specified number of elements from the start of the input sequence.
- Attributes
Applies to
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.
Entity Framework