ValueGenerator<TValue>.NextValueAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value to be assigned to a property.
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)
Parameters
- entry
- EntityEntry
The change tracking entry of the entity for which the value is being generated.
- cancellationToken
- CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Returns
The value to be assigned to a property.
Exceptions
If the CancellationToken is canceled.
Remarks
See EF Core value generation for more information and examples.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Entity Framework