Last post Apr 24, 2013 05:34 AM by DarrellNorton
Apr 24, 2013 05:26 AM|gurunguns|LINK
I have a Registeration operation to be completed using WCF which is a 3 step process:
1) an external service will be called to register.
2) account id generated from above step will be saved here to Database1.
3) ID generated in above two steps will be saved in Database2.
I am thinking of including these into WCF transaction.
My question is if let's say 3rd step fail then can it rollback above two steps. If no then what is the benefit of transaction here ?
Hope I have made my question clear.
Apr 24, 2013 05:34 AM|DarrellNorton|LINK
WCF Transactions allow the WCF component to participate in data transactions. The underlying transaction will be managed by SQL Server (if all on the same server) or Microsoft Distributed Transaction Coordinator (DTC) if database1 and database2 are on different
Since the database updates are in a transaction, if the 3rd step fails then the steps 1 and 2 will be rolled back.
For more info, see this section on Transaction Models in the WCF documentation: http://msdn.microsoft.com/en-us/library/ms731105.aspx