I have a wcf service which has methods which perform insert/update operations in an SQL db via stored procedures. If I enable transactions for the wcf service and call 2 methods from my client using transaction scope will the individual SQL operations also get rolled back in case of a failure.
1
votes
1 Answers
1
votes
Enabling transactions in WCF is not enough. According to Transactions in WCF Services example you need to do the following:
- Add transaction support to the service contract. This is required.
- Add transaction support to the code that implements the service contract. This is required.
- Configure transactions in the implementation code. This is optional.
- Enable transactions on the binding. This is required.