IRelationalDatabaseCreator.ExistsAsync(CancellationToken) 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.
Asynchronously determines whether the physical database exists. No attempt is made to determine if the database contains the schema for the current model.
public System.Threading.Tasks.Task<bool> ExistsAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member ExistsAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Function ExistsAsync (Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)
Parameters
- cancellationToken
- CancellationToken
A CancellationToken to observe while waiting for the task to complete.
Returns
A task that represents the asynchronous operation. The task result contains
true
if the database exists; otherwise false
.
Exceptions
If the CancellationToken is canceled.
Applies to
Entity Framework