Click or drag to resize

ConnectionStringSetComponent Method

Set the specified component of the connection string to value or adds it if there is no current value

Namespace: SanteDB.Core.Configuration.Data
Assembly: SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.2081-alpha+b4ae72647f2cc271f89142f76fff26ad69e00f5a
Syntax
public void SetComponent(
	string component,
	string value
)

Parameters

component  String
The component of the connection string to set
value  String
The value of the connection string to set
Example
C#
var cstr = new ConnectionString("npgsql", "Server=foo;Database=bar;");
cstr.SetComponent("server","foo.bar"); // Connection string is now : Server=foo.bar;Database=bar
cstr.SetComponent("user","yosemite"); // Connection string is now: Server=foo.bar;Database=bar;user=yosemite
See Also