I have a Azure function, which calls some API endpoint for database update/insert and then will complete the message in the Queue.In case azure functions code fails after API success, I want to rollback Db operations. How to do that? Please share any samples on this.
Azure Function Run
{
transactionscope
{
callAPI();
..some operations
x = y/0;
scope,complete()
}
}
API:
callAPI
{
transactionscope
{
saveDB();
scope.complete();
}
}