C# Class Elastacloud.AzureManagement.Fluent.Clients.SqlDatabaseClient

Constructs a SqlDatabase client used to manipulate WASD
Inheritance: ISqlDatabaseClient
Show file Open project: azurecoder/fluent-management Class Usage Examples

Public Methods

Method Description
AddIpsToSqlFirewallFromCloudService ( string cloudServiceName, bool removeAllOtherRules = true, DeploymentSlot slot = DeploymentSlot.Production ) : void

Adds IP addresses to the WASD firewall for a

DeleteDatabase ( string name, bool deleteServerIfLastDatabase = true ) : void

Deletes a database and also deletes the server if the database is the last one

SqlDatabaseClient ( string subscriptionId, X509Certificate2 managementCertificate, string serverName ) : System

Constructs a SqlDatabase client used to manipulate WASD

Private Methods

Method Description
CheckLoginCredentials ( ) : void

Checks that the login credentials for the server have been set

ExecuteCommand ( SqlConnection connection, string sql ) : void

Executes a set of commands against a Sql database

ExecuteCountCommand ( SqlConnection connection, string sql ) : int

Executes a count command against a table

GetConnection ( string dbName ) : SqlConnection

Gets a connection to a Sql Database

Method Details

AddIpsToSqlFirewallFromCloudService() public method

Adds IP addresses to the WASD firewall for a
public AddIpsToSqlFirewallFromCloudService ( string cloudServiceName, bool removeAllOtherRules = true, DeploymentSlot slot = DeploymentSlot.Production ) : void
cloudServiceName string
removeAllOtherRules bool
slot DeploymentSlot
return void

DeleteDatabase() public method

Deletes a database and also deletes the server if the database is the last one
public DeleteDatabase ( string name, bool deleteServerIfLastDatabase = true ) : void
name string
deleteServerIfLastDatabase bool
return void

SqlDatabaseClient() public method

Constructs a SqlDatabase client used to manipulate WASD
public SqlDatabaseClient ( string subscriptionId, X509Certificate2 managementCertificate, string serverName ) : System
subscriptionId string
managementCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
serverName string
return System