Interface IDbConnectionFactory
- Namespace
- Open.Database.Extensions
- Assembly
- Open.Database.Extensions.Core.dll
A common abstraction for creating database connections. Can easily be used with dependency injection.
public interface IDbConnectionFactory
- Extension Methods
Remarks
The factory never reuses connections: every call to Create() returns a new one that the caller owns. Use AsPool(IDbConnectionFactory) to present a factory as an IDbConnectionPool, which is how the expressive commands consume it.
A factory is the usual connection source. A custom IDbConnectionPool is only for a pooling scheme of your own.
Methods
- Create()
Creates a new connection.