ValueGenerator<TValue>.NextValueAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得要指派給屬性的值。
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 價值產生 。