Freigeben über


DbProviderServices.DbDatabaseExists-Methode (DbConnection, Nullable<Int32>, StoreItemCollection)

[Diese Seite bezieht sich auf Entity Framework Version 6. Die neueste Version ist als 'Entity Framework' NuGet-Paket verfügbar. Weitere Informationen zu Entity Framework finden Sie unter msdn.com/data/ef.]

Gibt einen Wert zurück, der angibt, ob eine bestimmte Datenbank auf dem Server vorhanden ist.

Namespace:  System.Data.Entity.Core.Common
Assembly:  EntityFramework (in EntityFramework.dll)

Syntax

'Declaration
Protected Overridable Function DbDatabaseExists ( _
    connection As DbConnection, _
    commandTimeout As Nullable(Of Integer), _
    storeItemCollection As StoreItemCollection _
) As Boolean
'Usage
Dim connection As DbConnection 
Dim commandTimeout As Nullable(Of Integer)
Dim storeItemCollection As StoreItemCollection 
Dim returnValue As Boolean 

returnValue = Me.DbDatabaseExists(connection, _
    commandTimeout, storeItemCollection)
protected virtual bool DbDatabaseExists(
    DbConnection connection,
    Nullable<int> commandTimeout,
    StoreItemCollection storeItemCollection
)
protected:
virtual bool DbDatabaseExists(
    DbConnection^ connection, 
    Nullable<int> commandTimeout, 
    StoreItemCollection^ storeItemCollection
)
abstract DbDatabaseExists : 
        connection:DbConnection * 
        commandTimeout:Nullable<int> * 
        storeItemCollection:StoreItemCollection -> bool  
override DbDatabaseExists : 
        connection:DbConnection * 
        commandTimeout:Nullable<int> * 
        storeItemCollection:StoreItemCollection -> bool
protected function DbDatabaseExists(
    connection : DbConnection, 
    commandTimeout : Nullable<int>, 
    storeItemCollection : StoreItemCollection
) : boolean

Parameter

  • commandTimeout
    Typ: System.Nullable<Int32>
    Ausführungstimeout für Befehle, die zum Bestimmen der Existenz der Datenbank benötigt werden.

Rückgabewert

Typ: System.Boolean
True, wenn der Anbieter die Datenbank nur auf Grundlage der Verbindung herleiten kann.

Siehe auch

Verweis

DbProviderServices Klasse

DbDatabaseExists-Überladung

System.Data.Entity.Core.Common-Namespace