You are currently browsing legacy 4.1 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

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