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
connectionPoolIDbConnectionPoolThe source connection pool.
Returns
- IDbConnectionPool<IDbConnection>
connectionPoolitself if it already implements IDbConnectionPool<TConnection> of IDbConnection; otherwise a wrapper that forwards Take() and Give(IDbConnection) to it.
Exceptions
- ArgumentNullException
connectionPoolis null.