共用方式為


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 價值產生

適用於