Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

TransactionScope integration with Web API

$
0
0

hi,

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?

Thanks,

Shahar


Viewing all articles
Browse latest Browse all 4850


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>