ValueGenerator<TValue>.NextValueAsync 方法

定义

获取要分配给属性的值。

protected override System.Threading.Tasks.Task<object> NextValueAsync (Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entry, System.Threading.CancellationToken cancellationToken = default);
protected override System.Threading.Tasks.ValueTask<object> NextValueAsync (Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entry, System.Threading.CancellationToken cancellationToken = default);
protected override System.Threading.Tasks.ValueTask<object?> NextValueAsync (Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entry, System.Threading.CancellationToken cancellationToken = default);
override this.NextValueAsync : Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
override this.NextValueAsync : Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<obj>
Protected Overrides Function NextValueAsync (entry As EntityEntry, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)
Protected Overrides Function NextValueAsync (entry As EntityEntry, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Object)

参数

entry
EntityEntry

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

cancellationToken
CancellationToken

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

返回

要分配给属性的值。

例外

注解

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

适用于