Table of Contents

Constructor SqlConnectionFactory

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

SqlConnectionFactory(Func<SqlConnection>)

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

public SqlConnectionFactory(Func<SqlConnection> factory)

Parameters

factory Func<SqlConnection>

The function that creates a new connection each time it is called.

Exceptions

ArgumentNullException

factory is null.

SqlConnectionFactory(string)

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

public SqlConnectionFactory(string connectionString)

Parameters

connectionString string

The connection string used for every connection the factory creates.