Table of Contents

Class DbConnectionFactory<TConnection>

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

A strongly typed connection factory implementation backed by a factory function.

public class DbConnectionFactory<TConnection> : DbConnectionFactory, IDbConnectionFactory<TConnection>, IDbConnectionFactory where TConnection : IDbConnection

Type Parameters

TConnection

The connection type.

Inheritance
DbConnectionFactory<TConnection>
Implements
Derived
Inherited Members
Extension Methods

Remarks

Every call to Create() invokes the function. The caller owns the returned connection and disposes it.

Constructors

DbConnectionFactory(Func<TConnection>)

Constructs a DbConnectionFactory<TConnection> from a factory function.

Methods

Create()

Creates a new connection by invoking the factory function.

Operators

implicit operator DbConnectionFactory<TConnection>(Func<TConnection>)

Implicitly converts a typed connection factory function to a typed connection factory instance.

See Also