Database Initialize Method MVC+ (Model-Facade-View-Controller) Framework for ASP.NET
Initializes database connection.

Namespace: NovaDimension.Data.Client
Assembly: NovaDimension.Data.Client (in NovaDimension.Data.Client.dll) Version: 4.0.204.0 (4.0.0204.0)
Syntax

public void Initialize(
	DbCfg pConfig
)

Implements

IInitializable T  Initialize(T)
Exceptions

Examples

This sample shows how to use the Initialize(DbCfg) static method.
See Also: DbConfig, SerializeHelper
using system;
using NovaDimension.Component;
using NovaDimension.Data;

class TestClass()
{
    static int Main()
    {
        DbConfig config;
        Database database;

        try
        {
            // Initializing UserManager database
            config = (DbConfig)SerializeHelper.Deserialize("\\Config", "DbConfig.config");
            database = new Database();
            database.Initialize(config.UserManager);
            // ...
        }
        catch (ExceptionEx<DatabaseException> ex)
        {
            Console.WriteLine(ex.Message);
        }
        finally
        {
            database.Release();
        }
    }
}
See Also