SchemaDeployment.OnDatabaseExists Method
When implemented in a derived class, verifies that the specified database exists.
Namespace: Microsoft.Data.Schema.Build
Assembly: Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)
Syntax
'Declaration
Protected Overridable Function OnDatabaseExists ( _
partialConnectionString As String, _
databaseName As String _
) As Boolean
protected virtual bool OnDatabaseExists(
string partialConnectionString,
string databaseName
)
protected:
virtual bool OnDatabaseExists(
String^ partialConnectionString,
String^ databaseName
)
abstract OnDatabaseExists :
partialConnectionString:string *
databaseName:string -> bool
override OnDatabaseExists :
partialConnectionString:string *
databaseName:string -> bool
protected function OnDatabaseExists(
partialConnectionString : String,
databaseName : String
) : boolean
Parameters
- partialConnectionString
Type: System.String
The connection string for the target database, which can be modified before creating the model.
- databaseName
Type: System.String
The name of the database.
Return Value
Type: System.Boolean
true if the database exists; otherwise, false. The default is false.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.