Share via


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.

Return Value

Type: System.Boolean
true if the database exists; otherwise, false. The default is false.

.NET Framework Security

See Also

Reference

SchemaDeployment Class

Microsoft.Data.Schema.Build Namespace