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
A sequence that contains the specified number of elements from the start of the input sequence.
- Attributes
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for