c# - TransactionScope Complete() doesn't commit the transaction before exiting the USING statement -
i experiencing weird behavior transaction gets committed when using
exits , not when calling scope.complete();
using (transactionscope scope = new transactionscope(transactionscopeoption.requiresnew)) { scope.complete(); // data still doesn't show in db } // shows in db
how commit transaction before exiting using
statement?
from documentation:
the actual work of commit between resources manager happens @ end using statement if transactionscope object created transaction.
so doesn't can commit transaction before using statement end.