DefaultSqlConnections class
namespace: Serenity.Data assembly: Serenity.Net.Services
Default connection factory
public class DefaultSqlConnections : ISqlConnections
| parameter | description |
|---|---|
| connectionStrings | Named connection strings |
| profiler | Profiler if any |
| loggerFactory | Optional logger factory (to be used by static SqlHelper methods) |
Public Members
| name | description |
|---|---|
| DefaultSqlConnections(…) | Default connection factory |
| ListConnectionStrings() | Lists all known connections strings |
| virtual New(…) | Creates a new IDbConnection for given connection string, provider name and dialect. |
| virtual NewByKey(…) | Creates a new IDbConnection for given connection key. |
| virtual TryGetConnectionString(…) | Gets a connection string by its key |
Protected Members
| name | description |
|---|---|
| readonly connectionStrings- | Connection strings |
| readonly loggerFactory- | Logger factory |
| readonly profiler- | Profiler |
| virtual CreateConnection(…) | Creates an actual connection based on providerName, this should not return a wrapped connection. |
| virtual WrapConnection(…) | Wraps and profiles the actual connection |
Remarks
Creates a new instance
See Also
- interface ISqlConnections
- Source: DefaultSqlConnections.cs