DatabaseFactory CreateFactory Method MVC+ (Model-Facade-View-Controller) Framework for ASP.NET
Creates instance of database factory.

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

public static IFactoryable<IConnectionable, DbCfg> CreateFactory(
	DbCfg pCfg
)

Return Value

Type: IFactoryable IConnectionable, DbCfg 
database factory object
Exceptions

Examples

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

class TestClass()
{
    static int Main()
    {
        try
        {
            DbConfig config = (DbConfig)SerializeHelper.Deserialize("\\Config", "DbConfig.config");
            IFactoryable<IConnectionable, DbCfg> factory = DatabaseFactory.CreateFactory(config.UserManager);
            // ...
        }
        catch (ExceptionEx<DatabaseFactoryException> ex)
        {
            Console.WriteLine(ex.Message);
        }
    }
}
See Also