Flexberry ORM 8.0.0-beta01
Класс ICSSoft.STORMNET.Business.DbTransactionWrapperAsync

Асинхронная обёртка над DbConnection и DbTransaction. Подробнее...

Граф наследования:ICSSoft.STORMNET.Business.DbTransactionWrapperAsync:

Открытые члены

 DbTransactionWrapperAsync (SQLDataService dataService)
 Initializes a new instance of the DbTransactionWrapper class. Подробнее...
 
 DbTransactionWrapperAsync (DbConnection connection, DbTransaction transaction=null)
 Initializes a new instance of the DbTransactionWrapper class. Подробнее...
 
async Task< DbCommand > CreateCommandAsync (string sql=null)
 Creates and returns a Command object associated with the connection. Подробнее...
 
virtual void CommitTransaction ()
 Commits the database transaction. FYI: does nothing if the transaction has not begun. Для защиты от This NpgsqlTransaction has completed; it is no longer usable.. Подробнее...
 
virtual void RollbackTransaction ()
 Rolls back a transaction from a pending state. FYI: does nothing if the transaction has not begun. Для защиты от This NpgsqlTransaction has completed; it is no longer usable.. Подробнее...
 
void Dispose ()
 
async Task< DbTransaction > GetTransactionAsync ()
 Открыть соединение и получить транзакцию. Подробнее...
 

Свойства

DbConnection Connection [get]
 Объект соединения, используемый обёрткой. Подробнее...
 

Подробное описание

Асинхронная обёртка над DbConnection и DbTransaction.

Конструктор(ы)

◆ DbTransactionWrapperAsync() [1/2]

ICSSoft.STORMNET.Business.DbTransactionWrapperAsync.DbTransactionWrapperAsync ( SQLDataService  dataService)
inline

Initializes a new instance of the DbTransactionWrapper class.

Аргументы
dataServiceThe instance of SQLDataService class.

◆ DbTransactionWrapperAsync() [2/2]

ICSSoft.STORMNET.Business.DbTransactionWrapperAsync.DbTransactionWrapperAsync ( DbConnection  connection,
DbTransaction  transaction = null 
)
inline

Initializes a new instance of the DbTransactionWrapper class.

Аргументы
connectionОбъект соединения, который будет использоваться в обёртке.
transactionТранзакция.

Методы

◆ CommitTransaction()

virtual void ICSSoft.STORMNET.Business.DbTransactionWrapperAsync.CommitTransaction ( )
inlinevirtual

Commits the database transaction. FYI: does nothing if the transaction has not begun. Для защиты от This NpgsqlTransaction has completed; it is no longer usable..

◆ CreateCommandAsync()

async Task<DbCommand> ICSSoft.STORMNET.Business.DbTransactionWrapperAsync.CreateCommandAsync ( string  sql = null)
inline

Creates and returns a Command object associated with the connection.

Аргументы
sqlThe text command to execute.
Возвращает
A Command object associated with the connection.

◆ GetTransactionAsync()

async Task<DbTransaction> ICSSoft.STORMNET.Business.DbTransactionWrapperAsync.GetTransactionAsync ( )
inline

Открыть соединение и получить транзакцию.

Возвращает
Транзакция.
Исключения
ExceptionОшибка во время открытия соединения/создания транзакции.

◆ RollbackTransaction()

virtual void ICSSoft.STORMNET.Business.DbTransactionWrapperAsync.RollbackTransaction ( )
inlinevirtual

Rolls back a transaction from a pending state. FYI: does nothing if the transaction has not begun. Для защиты от This NpgsqlTransaction has completed; it is no longer usable..

Полный список свойств

◆ Connection

DbConnection ICSSoft.STORMNET.Business.DbTransactionWrapperAsync.Connection
get

Объект соединения, используемый обёрткой.