Table of Contents

Class SqlDatabaseFactoryProvider

Namespace
LfrlAnvil.Sql
Assembly
LfrlAnvil.Sql.Core.dll

Represents a collection of ISqlDatabaseFactory instances identifiable by their Dialect.

public sealed class SqlDatabaseFactoryProvider
Inheritance
SqlDatabaseFactoryProvider
Inherited Members

Constructors

SqlDatabaseFactoryProvider()

Creates a new empty SqlDatabaseFactoryProvider instance.

public SqlDatabaseFactoryProvider()

Properties

SupportedDialects

Collection of registered SQL dialects.

public IReadOnlyCollection<SqlDialect> SupportedDialects { get; }

Property Value

IReadOnlyCollection<SqlDialect>

Methods

GetFor(SqlDialect)

Returns an ISqlDatabaseFactory instance associated with the provided dialect.

[Pure]
public ISqlDatabaseFactory GetFor(SqlDialect dialect)

Parameters

dialect SqlDialect

SQL dialect.

Returns

ISqlDatabaseFactory

ISqlDatabaseFactory instance associated with the provided dialect.

Exceptions

KeyNotFoundException

When dialect was not registered.

RegisterFactory(ISqlDatabaseFactory)

Registers the provided factory.

public SqlDatabaseFactoryProvider RegisterFactory(ISqlDatabaseFactory factory)

Parameters

factory ISqlDatabaseFactory

Factory to register.

Returns

SqlDatabaseFactoryProvider

this.