Last post Jul 07, 2015 01:27 AM by Krunal Parekh
Jul 06, 2015 02:12 AM|shahar.valdman|LINK
We are migrating an existing web-services application to Web API. The existing solution is using TransactionScope (on top of Oracle DB), for transaction consistency.
We would like to use the same approach in the Web API solution. I am looking for a central point to initialize the TransactionScope. My prefered option was to use a filter, which has access to the relevant controller and route meta-data - This approach allows
for fine-grained setting of the TransactionScope parameters according to the relevant function. Creating the TransactionScope in the filter did not work and the DB operations were not part of a transaction.
Setting the TransactionScope as a message handler does work, but seems like an over-kill and does not provide an easy configurtion by url/controller function.
What would be the bast approach to use TransactionScope with Web-API?
Jul 07, 2015 01:27 AM|Krunal Parekh|LINK
Please see this links. They explains how to do this using Message Handler and Distributed Transaction with web api.
Hope this helps.