Table of Contents

Method AsGeneric

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

AsGeneric(IDbConnectionFactory)

Converts a non-generic connection factory to a generic one.

public static IDbConnectionFactory<IDbConnection> AsGeneric(this IDbConnectionFactory connectionFactory)

Parameters

connectionFactory IDbConnectionFactory

The source connection factory.

Returns

IDbConnectionFactory<IDbConnection>

connectionFactory itself if it already implements IDbConnectionFactory<TConnection> of IDbConnection; otherwise a DbConnectionFactory<TConnection> that creates connections through it.

Exceptions

ArgumentNullException

connectionFactory is null.