Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

QueryableExtensions::MinAsync Method

Entity Framework 6.0
 

Asynchronously returns the minimum value of a sequence.

Namespace:   System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticMinAsync<TSource>(IQueryable<TSource>^)

Asynchronously returns the minimum value of a sequence.

System_CAPS_pubmethodSystem_CAPS_staticMinAsync<TSource>(IQueryable<TSource>^, CancellationToken)

Asynchronously returns the minimum value of a sequence.

System_CAPS_pubmethodSystem_CAPS_staticMinAsync<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_CAPS_pubmethodSystem_CAPS_staticMinAsync<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.

Return to top

QueryableExtensions::MinAsync<TSource> Method (IQueryable<TSource>^)

Asynchronously returns the minimum value of a sequence.

public:
generic<typename TSource>
[ExtensionAttribute]
static Task<TSource>^ MinAsync(
	IQueryable<TSource>^ source
)

Parameters

source
Type: System.Linq::IQueryable<TSource>^

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

Return Value

Type: System.Threading.Tasks::Task<TSource>^

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

Type Parameters

TSource

The type of the elements of source.

Exception Condition
ArgumentNullException

source is null .

InvalidOperationException

source does not implement IDbAsyncQueryProvider .

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.

Return to top

QueryableExtensions::MinAsync<TSource> Method (IQueryable<TSource>^, CancellationToken)

Asynchronously returns the minimum value of a sequence.

public:
generic<typename TSource>
[ExtensionAttribute]
static Task<TSource>^ MinAsync(
	IQueryable<TSource>^ source,
	CancellationToken cancellationToken
)

Parameters

source
Type: System.Linq::IQueryable<TSource>^

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

cancellationToken
Type: System.Threading::CancellationToken

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

Return Value

Type: System.Threading.Tasks::Task<TSource>^

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

Type Parameters

TSource

The type of the elements of source.

Exception Condition
ArgumentNullException

source is null .

InvalidOperationException

source does not implement IDbAsyncQueryProvider .

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.

Return to top

QueryableExtensions::MinAsync<TSource, TResult> Method (IQueryable<TSource>^, Expression<Func<TSource, TResult>^>^)

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

public:
generic<typename TSource, typename TResult>
[ExtensionAttribute]
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
static Task<TResult>^ MinAsync(
	IQueryable<TSource>^ source,
	Expression<Func<TSource, TResult>^>^ selector
)

Parameters

source
Type: System.Linq::IQueryable<TSource>^

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

selector
Type: System.Linq.Expressions::Expression<Func<TSource, TResult>^>^

A projection function to apply to each element.

Return Value

Type: System.Threading.Tasks::Task<TResult>^

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

Type Parameters

TSource

The type of the elements of source.

TResult

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

Exception Condition
ArgumentNullException

source or selector is null .

InvalidOperationException

source does not implement IDbAsyncQueryProvider .

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.

Return to top

QueryableExtensions::MinAsync<TSource, TResult> Method (IQueryable<TSource>^, Expression<Func<TSource, TResult>^>^, CancellationToken)

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

public:
generic<typename TSource, typename TResult>
[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
[SuppressMessageAttribute("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
[ExtensionAttribute]
static Task<TResult>^ MinAsync(
	IQueryable<TSource>^ source,
	Expression<Func<TSource, TResult>^>^ selector,
	CancellationToken cancellationToken
)

Parameters

source
Type: System.Linq::IQueryable<TSource>^

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

selector
Type: System.Linq.Expressions::Expression<Func<TSource, TResult>^>^

A projection function to apply to each element.

cancellationToken
Type: System.Threading::CancellationToken

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

Return Value

Type: System.Threading.Tasks::Task<TResult>^

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

Type Parameters

TSource

The type of the elements of source.

TResult

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

Exception Condition
ArgumentNullException

source or selector is null .

InvalidOperationException

source does not implement IDbAsyncQueryProvider .

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.

Return to top
Show: