WrappedConnection class
namespace: Serenity.Data assembly: Serenity.Net.Data
Wraps a connection to add current transaction and dialect support.
public class WrappedConnection : IDbConnection, IHasActualConnection, IHasCommandTimeout,
IHasConnectionStateChange, IHasCurrentTransaction, IHasDialect, IHasLogger, IHasOpenedOnce
Public Members
| name | description |
|---|---|
| WrappedConnection(…) | Initializes a new instance of the WrappedConnection class. |
| ActualConnection { get; } | Gets the actual connection instance. |
| CommandTimeout { get; set; } | Gets or sets default command timeout. |
| ConnectionString { get; set; } | Gets or sets the string used to open a database. |
| ConnectionTimeout { get; } | Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error. |
| CurrentTransaction { get; } | Gets the current transaction. |
| Database { get; } | Gets the name of the current database or the database to be used after a connection is opened. |
| Dialect { get; set; } | Gets or sets the SQL dialect. |
| Logger { get; } | Gets the logger instance for this connection if any |
| OpenedOnce { get; } | Gets a value indicating whether the connection was opened once. |
| State { get; } | Gets the current state of the connection. |
| event StateChange | Implements state change event by proxying it to the actual connection |
| BeginTransaction() | Begins a database transaction. |
| BeginTransaction(…) | Begins a database transaction with the specified IsolationLevel value. |
| ChangeDatabase(…) | Changes the current database for an open Connection object. |
| Close() | Closes the connection to the database. |
| CreateCommand() | Creates and returns a Command object associated with the connection. |
| Dispose() | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
| Open() | Opens a database connection with the settings specified by the ConnectionString property of the provider-specific Connection object. |
See Also
- interface IHasActualConnection
- interface IHasCommandTimeout
- interface IHasConnectionStateChange
- interface IHasCurrentTransaction
- interface IHasDialect
- interface IHasLogger
- interface IHasOpenedOnce
- Source: WrappedConnection.cs