ValueGenerator.NextAsync(EntityEntry, CancellationToken) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取要分配给属性的值。
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 值生成 。