Langue

ValueGenerator.NextValueAsync(EntityEntry, CancellationToken) Méthode

Définition

Méthode de modèle à remplacer par des implémentations pour effectuer une génération de valeur.

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)

Paramètres

entry
EntityEntry

Entrée de suivi des modifications de l’entité pour laquelle la valeur est générée.

cancellationToken
CancellationToken

À CancellationToken observer lors de l’attente de la fin de la tâche.

Retours

Valeur générée.

Exceptions

Si la CancellationToken valeur est annulée.

Remarques

Pour plus d’informations et d’exemples, consultez la génération de valeurs EF Core .

S’applique à