Testing the transaction behavior of the WCF service
Before explaining how to enhance this WCF service to support distributed transactions, we will first confirm that the existing WCF service doesn't support distributed transactions. In this section, we will test the following scenarios:
- Create a WPF client to call the service twice in one method.
- The first service call should succeed and the second service call should fail.
- Verify that the update in the first service call has been committed to the database, which means that the WCF service does not support distributed transactions.
- Wrap the two service calls in one
TransactionScope and redo the test.
- Verify that the update in the first service call has still been committed to the database which means ...