WrappedConnection class

namespace: Serenity.Data   assemblySerenity.Net.Data

Wraps a connection to add current transaction and dialect support.

public class WrappedConnection : IDbConnection, IHasActualConnection, IHasCommandTimeout, 
    IHasCurrentTransaction, IHasDialect, 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.
OpenedOnce { get; } Gets a value indicating whether the connection was opened once.
State { get; } Gets the current state of the 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