ConnectionProvider Class

Assembly: CodeEffects.Rule.Connection.SqlServer.dll
Namespace: CodeEffects.Rule.Connection.SqlServer

Summary

The ready-made IConnectionProvider for SQL Server: it creates a SqlConnection for a connection string. The DbProvider of this namespace creates one for you, so you use this class directly only in a provider of your own.

Syntax

public class ConnectionProvider : IConnectionProvider

Remarks

Every call returns a new, unopened connection; the libraries open and dispose it. The class is safe to call from several threads. The connection comes from Microsoft.Data.SqlClient.

Constructors

  • ConnectionProvider(..)

    public ConnectionProvider(string connectionString)

    Initializes a new instance for the connection string.

    Parameters

    • connectionString (System.String) - The connection string of the database that holds rule storage.

Properties

  • ConnectionString

    Type: System.String

    Gets the connection string.

Methods

  • CreateConnection

    Returns: System.Data.IDbConnection - A new SqlConnection that has not been opened.

    Creates a connection to the database. The caller opens it and disposes it.

Ask on Stack Overflow - Yes, it's still active
Ask in GitHub Discussions

p102

l097 --

l102

p101

×