Working with transactions



We have a main entity called "VOB" that it's related to 10 more, we have created a webapi controller to persist the VOB changes in the database, those changes implies changes in the other 10 entities too. To accomplish that we used transactions, one transaction that takes care of 10 possible commit to the database. To make post method shorter we decided to split it in different blocks of code, using different classes, see the pictures attached. As you can see, to keep the transaction we passed the dbContext as a parameter is this a correnct way to accomplish it ?


file attachments

Closed Jul 6 at 5:42 PM by ajcvickers
EF Team Triage: Thanks for reporting an issue on Entity Framework 6.x. This project is now maintained on GitHub (https://github.com/aspnet/EntityFramework6). Please file your issue on the GitHub issue tracker. We will no longer be monitoring this issue tracker for comments, so please do not reply here.