I always use the following format to use transactions.
using (TransactionScope scope = new TransactionScope ()) {
....
}
Sometimes I want to wrap a transaction in a new class, for example, the DbContext class, I want to use an instruction like
dbContext.Begin ();
...
dbContext.Submit ();
It seems that the transaction class needs to use the "using" statement to delete, I want to know if in any case not to use "use".
source
share