ValueGenerator<TValue>.NextAsync(EntityEntry, CancellationToken) 方法

定义

要由实现重写以执行值生成的模板方法。

public virtual System.Threading.Tasks.Task<TValue> NextAsync (Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entry, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.ValueTask<TValue> NextAsync (Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entry, System.Threading.CancellationToken cancellationToken = default);
override this.NextAsync : Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Value>
override this.NextAsync : Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<'Value>
Public Overridable Function NextAsync (entry As EntityEntry, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TValue)
Public Overridable Function NextAsync (entry As EntityEntry, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of TValue)

参数

entry
EntityEntry

要为其生成值的实体的更改跟踪条目。

cancellationToken
CancellationToken

等待 CancellationToken 任务完成时要观察的 。

返回

Task<TValue>
ValueTask<TValue>

生成的值。

例外

注解

有关详细信息和示例,请参阅 EF Core 值生成

适用于