Table of Contents

Method AsGeneric

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

AsGeneric(IDbConnectionPool)

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

public static IDbConnectionPool<IDbConnection> AsGeneric(this IDbConnectionPool connectionPool)

Parameters

connectionPool IDbConnectionPool

The source connection pool.

Returns

IDbConnectionPool<IDbConnection>

connectionPool itself if it already implements IDbConnectionPool<TConnection> of IDbConnection; otherwise a wrapper that forwards Take() and Give(IDbConnection) to it.

Exceptions

ArgumentNullException

connectionPool is null.