Class DbConnectionString<T, TBuilder>

Namespace: ETLBox
Assembly: ETLBox.dll
Syntax
    public abstract class DbConnectionString<T, TBuilder> : IDbConnectionString where T : DbConnectionString<T, TBuilder>, new() where TBuilder : DbConnectionStringBuilder, new()
Type Parameters
NameDescription
T

Derived type

TBuilder

The underlying ADO.NET connection string builder

Constructors

DbConnectionString()

Declaration
    public DbConnectionString()

DbConnectionString(string)

Declaration
    protected DbConnectionString(string value)
Parameters
TypeNameDescription
stringvalue

Properties

Builder

The underlying ADO.NET ConnectionStringBuilder

Declaration
    public TBuilder Builder { get; }
Property Value
TypeDescription
TBuilder

DbName

The database name

Declaration
    public abstract string DbName { get; set; }
Property Value
TypeDescription
string

DbNameKeyword

The keyword used in the connection string to identify a database

Declaration
    protected abstract string DbNameKeyword { get; }
Property Value
TypeDescription
string

MasterDbName

The name of the master database (if applicable)

Declaration
    public abstract string MasterDbName { get; }
Property Value
TypeDescription
string

Value

The connection string value, e.g. "Server=localhost;Database=etlbox;"

Declaration
    public virtual string Value { get; set; }
Property Value
TypeDescription
string

Methods

Clone()

Clones the current connection string

Declaration
    public virtual T Clone()
Returns
TypeDescription
T

A copy of the current connection string

CloneWithMasterDbName()

Clones the current connection string with the master database name (if applicable)

Declaration
    public virtual T CloneWithMasterDbName()
Returns
TypeDescription
T

The new connection string with master database name

CloneWithNewDbName(string)

Clone the current connection string with a new database name

Declaration
    public virtual T CloneWithNewDbName(string value)
Parameters
TypeNameDescription
stringvalue

The new database name

Returns
TypeDescription
T

The new connection string

CloneWithoutDbName()

Clones the current connection string with removing the database name

Declaration
    public virtual T CloneWithoutDbName()
Returns
TypeDescription
T

The new connection string without database name

ToString()

Returns the connection string Value

Declaration
    public override string ToString()
Returns
TypeDescription
string

The new connection string

Overrides

Implements