语言

ShapedQueryCompilingExpressionVisitor.SingleAsync<TSource> 方法

定义

这是一个内部 API,支持Entity Framework Core基础结构,不受与公共 API 相同的兼容性标准的约束。 可以在任何版本中更改或删除它,而不通知。 只需在代码中直接使用它,并非常谨慎地知道这样做可能会导致应用程序在更新到新的Entity Framework Core版本时失败。

[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)

类型参数

TSource

参数

asyncEnumerable
IAsyncEnumerable<TSource>
cancellationToken
CancellationToken

返回

Task<TSource>
特性

适用于