OpenAsync()
This method will call into the OpenAsync
implementation with argument cancellationToken
passed as CancellationToken.None
.
Declaration
// C# public Task OpenAsync();
Return Value
Task object representing the asynchronous operation immediately without blocking the calling thread for the whole duration of opening connection.
Implements
DbConnection
Exceptions
-
ObjectDisposedException
- The object is already disposed. -
InvalidOperationException
- The connection is already opened or the connection string is null or empty.