Skip to content

DefaultSqlConnections class

namespace: Serenity.Data   assemblySerenity.Net.Services

The default connection factory.

public class DefaultSqlConnections : IConnectionKeyFallbacks, ISqlConnections
parameter description
connectionStrings The named connection strings.
profiler The profiler, if any.
loggerFactory The optional logger factory (to be used by static SqlHelper methods).

Public Members

name description
DefaultSqlConnections(…) The default connection factory.
GetConnectionKeyFallbacks(…)
GetConnectionKeysResolvingTo(…)
ListConnectionStrings() Lists all known connection strings.
virtual New(…) Creates a new IDbConnection for the given connection string, provider name, and dialect.
virtual NewByKey(…) Creates a new IDbConnection for the given connection key.
ResolveConnectionKey(…)
virtual TryGetConnectionString(…) Gets a connection string by its key.

Protected Members

name description
readonly connectionKeyFallbacks The connection key fallbacks, if the connection string source supports them.
readonly connectionStrings The connection strings.
readonly loggerFactory The logger factory.
readonly profiler The profiler.
virtual CreateConnection(…) Creates an actual connection based on the provider name. This should not return a wrapped connection.
virtual WrapConnection(…) Wraps and profiles the actual connection.

Remarks

Creates a new instance.

See Also