Operations: How to Remove Connection String

You can remove a connection string by using RemoveConnectionStringOperation.

Syntax

public RemoveConnectionStringOperation(T connectionString)
Parameters
connectionString T Connection string to remove: RavenConnectionString or SqlConnectionString

Example - Remove Raven Connection String

RemoveConnectionStringOperation<RavenConnectionString> operation
    = new RemoveConnectionStringOperation<RavenConnectionString>(
        connectionString);

store.Maintenance.Send(operation);

Example - Remove Sql Connection String

RemoveConnectionStringOperation<SqlConnectionString> operation
    = new RemoveConnectionStringOperation<SqlConnectionString>(
        connectionString);

store.Maintenance.Send(operation);