.NET Framework 4.6 and 4.5
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
|OpenAsync()||An asynchronous version of Open, which opens a database connection with the settings specified by the ConnectionString. This method invokes the virtual method OpenAsync with CancellationToken.None. (Inherited from DbConnection.)|
|OpenAsync(CancellationToken)||An asynchronous version of Open, which opens a database connection with the property settings specified by the ConnectionString. The cancellation token can be used to request that the operation be abandoned before the connection timeout elapses. Exceptions will be propagated via the returned Task. If the connection timeout time elapses without successfully connecting, the returned Task will be marked as faulted with an Exception. The implementation returns a Task without blocking the calling thread for both pooled and non-pooled connections. (Overrides DbConnection.OpenAsync(CancellationToken).)|