Partager via


ShapedQueryCompilingExpressionVisitor.SingleAsync<TSource> Method

Definition

This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.

[Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal]
public static System.Threading.Tasks.Task<TSource> SingleAsync<TSource> (System.Collections.Generic.IAsyncEnumerable<TSource> asyncEnumerable, System.Threading.CancellationToken cancellationToken = default);
[<Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkInternal>]
static member SingleAsync : System.Collections.Generic.IAsyncEnumerable<'Source> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Source>
Public Shared Function SingleAsync(Of TSource) (asyncEnumerable As IAsyncEnumerable(Of TSource), Optional cancellationToken As CancellationToken = Nothing) As Task(Of TSource)

Type Parameters

TSource

Parameters

asyncEnumerable
IAsyncEnumerable<TSource>
cancellationToken
CancellationToken

Returns

Task<TSource>
Attributes

Applies to