Class SqlServerDatabaseConnection
Class for handling the database connection
Inherited Members
Namespace: MESL.SqlRace.Domain
Assembly: MESL.SqlRace.Domain.dll
Syntax
public sealed class SqlServerDatabaseConnection : DatabaseConnection, INotifyPropertyChanged, IDatabaseConnection
Constructors
SqlServerDatabaseConnection(String)
Initializes a new instance of the SqlServerDatabaseConnection class.
Declaration
public SqlServerDatabaseConnection(string friendlyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | friendlyName | Name of the friendly. |
SqlServerDatabaseConnection(String, String, String)
Initializes a new instance of the SqlServerDatabaseConnection class.
Declaration
public SqlServerDatabaseConnection(string serverName, string databaseName, string friendlyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | serverName | Name of the server |
System.String | databaseName | Database name |
System.String | friendlyName | Friendly name |
SqlServerDatabaseConnection(String, String, String, String)
Initializes a new instance of the SqlServerDatabaseConnection class.
Declaration
public SqlServerDatabaseConnection(string serverName, string databaseName, string friendlyName, string rootPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | serverName | Name of the server. |
System.String | databaseName | Name of the database. |
System.String | friendlyName | Name of the friendly. |
System.String | rootPath | The root path. |
Properties
Identifier
Gets the identifier for the database
Declaration
public override string Identifier { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
NonFriendlyIdentifier
Gets the non identifier for the database
Declaration
public override string NonFriendlyIdentifier { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
GetConnectionInformation()
Gets the connection information
Declaration
public override ConnectionInformationBase GetConnectionInformation()
Returns
Type | Description |
---|---|
ConnectionInformationBase | Connection information |
Overrides
GetConnectionString()
Gets the connection string for connecting to SQL Race. This can be a database connection string (e.g. for SQL Server) or a SQL Race Server connection string (containing details of IP addresses and port)
Declaration
public override string GetConnectionString()
Returns
Type | Description |
---|---|
System.String | Connection string. |
Overrides
GetConnectionString(Boolean)
Get the connection string
Declaration
public string GetConnectionString(bool includeDatabase)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | includeDatabase | If set to |
Returns
Type | Description |
---|---|
System.String | Connection string |