MooTransaction Reference
Role#
MooTransaction represents an active SQL Server transaction created by db.BeginTransactionAsync(...) where db is a MooDbContext.
Properties#
Sql:MooSqlBulk:MooBulk
Main methods#
Task<Key points#
- all commands share the same connection and SQL transaction
MooTransactionshould normally be used withawait using- disposing an uncommitted transaction rolls it back automatically
- disposing the transaction releases the underlying SQL transaction
- if the transaction owns its connection, disposing it also disposes that connection
- if a caller-supplied
SqlConnectionis used, it is not disposed by the transaction - once committed, that transaction instance is complete and cannot be reused