DbProviderServices.DatabaseExists Method
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | DatabaseExists(DbConnection, Nullable<Int32>, Lazy<StoreItemCollection>) | Returns a value indicating whether a given database exists on the server. |
![]() | DatabaseExists(DbConnection, Nullable<Int32>, StoreItemCollection) | Returns a value indicating whether a given database exists on the server. |
DbProviderServices.DatabaseExists Method (DbConnection, Nullable<Int32>, Lazy<StoreItemCollection>)
Returns a value indicating whether a given database exists on the server.
public bool DatabaseExists( DbConnection connection, Nullable<int> commandTimeout, Lazy<StoreItemCollection> storeItemCollection )
Parameters
- connection
-
Type:
System.Data.Common.DbConnection
Connection to a database whose existence is checked by this method.
- commandTimeout
-
Type:
System.Nullable<Int32>
Execution timeout for any commands needed to determine the existence of the database.
- storeItemCollection
-
Type:
System.Lazy<StoreItemCollection>
The collection of all store items from the model. This parameter is no longer used for determining database existence.
Return Value
Type: System.BooleanTrue if the provider can deduce the database only based on the connection.
DbProviderServices.DatabaseExists Method (DbConnection, Nullable<Int32>, StoreItemCollection)
Returns a value indicating whether a given database exists on the server.
public bool DatabaseExists( DbConnection connection, Nullable<int> commandTimeout, StoreItemCollection storeItemCollection )
Parameters
- connection
-
Type:
System.Data.Common.DbConnection
Connection to a database whose existence is checked by this method.
- commandTimeout
-
Type:
System.Nullable<Int32>
Execution timeout for any commands needed to determine the existence of the database.
- storeItemCollection
-
Type:
System.Data.Entity.Core.Metadata.Edm.StoreItemCollection
The collection of all store items from the model. This parameter is no longer used for determining database existence.
Return Value
Type: System.BooleanTrue if the provider can deduce the database only based on the connection.