In my Project, DAL Is WCF service .Net4.0. using database oracle 11g. I am using transaction scope in WCF(server side). I have to call more than one Stored procedure inside the method(operation contract) if any one sp failed, I need to rollback already executed sp. But rollback not happened. I am not used client side transaction flow.
I have placed sample code
public class Service : IService {
public bool Method1()
{
using (TransactionScope Scope1 = new TransactionScope())
{
Method2();
Method3();
Scope1.Complete();
}
return true;
}
public bool Method2()
{
using (TransactionScope Scope2 = new TransactionScope())
{
// Procedure call .....
Scope2.Complete();
}
return true;
}
public bool Method3()
{
using (TransactionScope Scope3 = new TransactionScope())
{
// Procedure call .....
Scope3.Complete();
}
return true;
}
}