SqlDatabaseTestService.DeployDatabaseProject Method

 

Deploys a database project.

Namespace:   Microsoft.Data.Tools.Schema.Sql.UnitTesting
Assembly:  Microsoft.Data.Tools.Schema.Sql.UnitTesting (in Microsoft.Data.Tools.Schema.Sql.UnitTesting.dll)

Overload List

Name Description
System_CAPS_pubmethod DeployDatabaseProject()

Deploys the database project by using the settings of the user in the app.config file.

System_CAPS_protmethodSystem_CAPS_static DeployDatabaseProject(String, String, String, String)

Deploys a database project to the database that is specified in the referenced configuration.

Remarks

These methods are called by the infrastructure when the assembly is initialized. The methods establish the test database before any unit tests being executed.

See Also

SqlDatabaseTestService Class
Microsoft.Data.Tools.Schema.Sql.UnitTesting Namespace

Return to top

SqlDatabaseTestService.DeployDatabaseProject Method ()

Deploys the database project by using the settings of the user in the app.config file.

Syntax

public virtual void DeployDatabaseProject()
public:
virtual void DeployDatabaseProject()
abstract DeployDatabaseProject : unit -> unit
override DeployDatabaseProject : unit -> unit
Public Overridable Sub DeployDatabaseProject

Remarks

Override this method in order to control database deployment behavior. For example, you might want to deploy to an Oracle database. These methods use the privileged context to deploy the database project.

Return to top

SqlDatabaseTestService.DeployDatabaseProject Method (String, String, String, String)

Deploys a database project to the database that is specified in the referenced configuration.

Syntax

protected static void DeployDatabaseProject(
    string databaseProjectFileName,
    string configuration,
    string providerInvariantName,
    string connectionString
)
protected:
static void DeployDatabaseProject(
    String^ databaseProjectFileName,
    String^ configuration,
    String^ providerInvariantName,
    String^ connectionString
)
static member DeployDatabaseProject : 
        databaseProjectFileName:string *
        configuration:string *
        providerInvariantName:string *
        connectionString:string -> unit
Protected Shared Sub DeployDatabaseProject (
    databaseProjectFileName As String,
    configuration As String,
    providerInvariantName As String,
    connectionString As String
)

Parameters

  • databaseProjectFileName
    Type: System.String

    The path of the database project file.

  • Configuration
    The solution build configuration that is used the deployment MSBuild task is executed.
  • connectionString
    Type: System.String

    The connection string for the target database. This must be a connection string to a SQL database.

Remarks

This method deploys a database project if the necessary information has been added to the app.config file by using the classes provided in the N:Microsoft.Data.Schema.UnitTesting.Configuration namespace.

A privileged connection context is used to deploy the database.

See Also

System.Data.SqlClient
N:Microsoft.Data.Schema.UnitTesting.Configuration

Return to top