PooledDbContextFactory<TContext>.CreateDbContextAsync 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.
Creates a new DbContext instance in an async context.
public virtual System.Threading.Tasks.Task<TContext> CreateDbContextAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member CreateDbContextAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)>
override this.CreateDbContextAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Context (requires 'Context :> Microsoft.EntityFrameworkCore.DbContext)>
Public Overridable Function CreateDbContextAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of TContext)
Parameters
- cancellationToken
- CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Returns
Task<TContext>
A task containing the created context that represents the asynchronous operation.
Implements
Applies to
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.
Entity Framework