共用方式為


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

適用於