Language
C#
Article For
4.1 4.2 5.1 5.2 5.3

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<>(connectionString);

store.maintenance().send(operation);

Example - Remove Sql Connection String

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

store.maintenance().send(operation);