/ Assembly List / LJCDataAccessConfig / DataConfig

Namespace - LJCDataAccessConfig


Syntax

C#
public class DataConfig : IComparable<DataConfig>

Represents a data location configuration. (R)

Public Methods
#ctor Initializes an object instance.
CompareTo Provides the default Sort functionality.
GetConnectionString Creates the populated connection string.
GetConnectionString Creates the populated connection string from the ConnectionType name.
GetConnectionStringFromText Creates the populated connection string from the template text.
GetProviderName Retrieves the provider name value.
GetProviderName Retrieves the provider name value.
SQLIntegratedConnectionString Creates the SQL integrated connection string from an internal value.
ToString The object string identifier.
22 Methods

Properties
ConnectionTypeName Gets or sets the ConnectionType value.
Database Gets or sets the Database name.
DbServer Gets or sets the DbServer instance name.
Name Gets or sets the DataConfig name.
Pswd Gets or sets the Password.
UserID Gets or sets the User ID.

Example

This is main function sample code for testing. The code for the additional test functions is listed under the methods with the same names.

C#
using LJCDataAccessConfig;

// Test DataConfig.
private static void TestDataConfig()
{
  DataConfigs dataConfigs = new DataConfigs();
  dataConfigs.LJCLoadData();
  dataConfig = dataConfigs.LJCGetByName("ConfigName");

  var connTypeName = "SQLServer";
  GetConnectionString(dataConfig);
  GetConnectionString2(connTypeName);
  GetConnectionStringFromText(dataConfig);
  SQLIntegratedConnectionString(dataConfig);
  GetProviderName(connTypeName);
  GetProviderName2(dataConfig);
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.