Reputation: 1618
using (var trn =database.GetTransaction())
{
database.BeginTransaction();//it is required or not?
database.Save(Table);
trn.complete()
}
what is use of BeginTransaction() in petapoco?
Upvotes: 0
Views: 612
Reputation: 39453
GetTransaction()
create a new transaction object, that executes BeginTransaction()
so there no need to call it.
I think the you can use BeginTransaction()
when you need more granular transaction control. I've never used it independently.
Upvotes: 1