ValueGenerator.NextAsync(EntityEntry, CancellationToken) 方法

定义

获取要分配给属性的值。

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

参数

entry
EntityEntry

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

cancellationToken
CancellationToken

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

返回

要分配给属性的值。

例外

注解

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

适用于