Table of Contents

Class SqlConnectionFactory

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.MSSqlClient.dll

A connection factory that creates a new SqlConnection each time it is asked, either from a factory function or from a connection string.

public class SqlConnectionFactory : DbConnectionFactory<SqlConnection>, IDbConnectionFactory<SqlConnection>, IDbConnectionFactory
Inheritance
SqlConnectionFactory
Implements
Inherited Members
Extension Methods

Remarks

The factory holds no connections. The caller of Create owns the connection it receives and disposes it; the expressive commands do this automatically.

Constructors

SqlConnectionFactory(Func<SqlConnection>)

Constructs a factory that invokes a function to create each connection.

SqlConnectionFactory(string)

Constructs a factory that creates a SqlConnection from a connection string each time it is asked.

See Also

DbConnectionFactory<TConnection>