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
connectionFactoryIDbConnectionFactoryThe source connection factory.
Returns
- IDbConnectionFactory<IDbConnection>
connectionFactoryitself if it already implements IDbConnectionFactory<TConnection> of IDbConnection; otherwise a DbConnectionFactory<TConnection> that creates connections through it.
Exceptions
- ArgumentNullException
connectionFactoryis null.