QueryableExtensions.MinAsync Method

Definition

Overloads

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

Asynchronously invokes a projection function on each element of a sequence and returns the minimum resulting value.

MinAsync<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>, CancellationToken)

Asynchronously invokes a projection function on each element of a sequence and returns the minimum resulting value.

MinAsync<TSource>(IQueryable<TSource>)

Asynchronously returns the minimum value of a sequence.

MinAsync<TSource>(IQueryable<TSource>, CancellationToken)

Asynchronously returns the minimum value of a sequence.

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

Asynchronously invokes a projection function on each element of a sequence and returns the minimum resulting value.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public static System.Threading.Tasks.Task<TResult> MinAsync<TSource,TResult> (this System.Linq.IQueryable<TSource> source, System.Linq.Expressions.Expression<Func<TSource,TResult>> selector);
static member MinAsync : System.Linq.IQueryable<'Source> * System.Linq.Expressions.Expression<Func<'Source, 'Result>> -> System.Threading.Tasks.Task<'Result>
<Extension()>
Public Function MinAsync(Of TSource, TResult) (source As IQueryable(Of TSource), selector As Expression(Of Func(Of TSource, TResult))) As Task(Of TResult)

Type Parameters

TSource

The type of the elements of source.

TResult

The type of the value returned by the function represented by selector .

Parameters

source
IQueryable<TSource>

An IQueryable<T> that contains the elements to determine the minimum of.

selector
Expression<Func<TSource,TResult>>

A projection function to apply to each element.

Returns

Task<TResult>

A task that represents the asynchronous operation. The task result contains the minimum value in the sequence.

Attributes

Exceptions

source or selector is null .

Remarks

Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.

Applies to

MinAsync<TSource,TResult>(IQueryable<TSource>, Expression<Func<TSource,TResult>>, CancellationToken)

Asynchronously invokes a projection function on each element of a sequence and returns the minimum resulting value.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public static System.Threading.Tasks.Task<TResult> MinAsync<TSource,TResult> (this System.Linq.IQueryable<TSource> source, System.Linq.Expressions.Expression<Func<TSource,TResult>> selector, System.Threading.CancellationToken cancellationToken);
static member MinAsync : System.Linq.IQueryable<'Source> * System.Linq.Expressions.Expression<Func<'Source, 'Result>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Result>

Type Parameters

TSource

The type of the elements of source.

TResult

The type of the value returned by the function represented by selector .

Parameters

source
IQueryable<TSource>

An IQueryable<T> that contains the elements to determine the minimum of.

selector
Expression<Func<TSource,TResult>>

A projection function to apply to each element.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

Task<TResult>

A task that represents the asynchronous operation. The task result contains the minimum value in the sequence.

Attributes

Exceptions

source or selector is null .

Remarks

Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.

Applies to

MinAsync<TSource>(IQueryable<TSource>)

Asynchronously returns the minimum value of a sequence.

public static System.Threading.Tasks.Task<TSource> MinAsync<TSource> (this System.Linq.IQueryable<TSource> source);
static member MinAsync : System.Linq.IQueryable<'Source> -> System.Threading.Tasks.Task<'Source>
<Extension()>
Public Function MinAsync(Of TSource) (source As IQueryable(Of TSource)) As Task(Of TSource)

Type Parameters

TSource

The type of the elements of source.

Parameters

source
IQueryable<TSource>

An IQueryable<T> that contains the elements to determine the minimum of.

Returns

Task<TSource>

A task that represents the asynchronous operation. The task result contains the minimum value in the sequence.

Exceptions

source is null .

Remarks

Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.

Applies to

MinAsync<TSource>(IQueryable<TSource>, CancellationToken)

Asynchronously returns the minimum value of a sequence.

public static System.Threading.Tasks.Task<TSource> MinAsync<TSource> (this System.Linq.IQueryable<TSource> source, System.Threading.CancellationToken cancellationToken);
static member MinAsync : System.Linq.IQueryable<'Source> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Source>

Type Parameters

TSource

The type of the elements of source.

Parameters

source
IQueryable<TSource>

An IQueryable<T> that contains the elements to determine the minimum of.

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for the task to complete.

Returns

Task<TSource>

A task that represents the asynchronous operation. The task result contains the minimum value in the sequence.

Exceptions

source is null .

Remarks

Multiple active operations on the same context instance are not supported. Use 'await' to ensure that any asynchronous operations have completed before calling another method on this context.

Applies to