Читати англійською Редагувати

Поділитися через


DbProviderServices.DatabaseExists Method

Definition

Returns a value indicating whether a given database exists on the server and whether schema objects contained in the storeItemCollection have been created.

C#
public bool DatabaseExists(System.Data.Common.DbConnection connection, int? commandTimeout, System.Data.Metadata.Edm.StoreItemCollection storeItemCollection);

Parameters

connection
DbConnection

Connection to a database whose existence is verified by this method.

commandTimeout
Nullable<Int32>

Execution timeout for any commands needed to determine the existence of the database.

storeItemCollection
StoreItemCollection

The collection of all store items contained in the database whose existence is determined by this method.

Returns

true if the provider can deduce the database only based on the connection.

Applies to

Продукт Версії
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1