I'm thinking of implementing TransactionScope
in my code, however, all bank accesses are done by StoredProcedures
.
Can TransactionScope
be able to give rollback
in multiple actions performed in StoredProcedures
?
using (var trans = new TransactionScope()) {
try {
this.Teste1Repository.Insert(); // Chamada a primeira PROC
this.Teste2Repository.Insert(); // Chamada a segunda PROC
trans.Complete();
}
catch {
// Trata erro
}
}