Partilhar via


ValueGenerator.NextValueAsync(EntityEntry, CancellationToken) Método

Definição

Método de modelo a ser substituído por implementações para executar a geração de valor.

protected virtual System.Threading.Tasks.Task<object> NextValueAsync (Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entry, System.Threading.CancellationToken cancellationToken = default);
protected virtual System.Threading.Tasks.ValueTask<object> NextValueAsync (Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entry, System.Threading.CancellationToken cancellationToken = default);
protected virtual System.Threading.Tasks.ValueTask<object?> NextValueAsync (Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry entry, System.Threading.CancellationToken cancellationToken = default);
abstract member 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.Task<obj>
abstract member NextValueAsync : Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<obj>
override this.NextValueAsync : Microsoft.EntityFrameworkCore.ChangeTracking.EntityEntry * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<obj>
Protected Overridable Function NextValueAsync (entry As EntityEntry, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)
Protected Overridable Function NextValueAsync (entry As EntityEntry, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Object)

Parâmetros

entry
EntityEntry

A entrada de controle de alterações da entidade para a qual o valor está sendo gerado.

cancellationToken
CancellationToken

Um CancellationToken a ser observado enquanto aguarda a conclusão da tarefa.

Retornos

O valor gerado.

Exceções

Se o padrão CancellationToken for cancelado.

Comentários

Consulte Geração de valor do EF Core para obter mais informações e exemplos.

Aplica-se a