I want to find a way to manage the EF connection and transaction under the db base, to make sure that my application uses only one connection at a time per transaction (I will need to support both Oracle and SQL Server).
I found this one that contains many recommendations, but calls (like all the other articles that I read) TransactionScope . Well, I would like to stay away from TransactionScope , if possible ...
Can I get a solution for this playback only with pure DbConnection and DbTransaction or is it simply impossible or wrong?
Moreover, I found this article here , indicating in the section:
" Indication of own transaction "
Just as you can override the default behavior with a connection, you can also control the functionality of transactions. If you explicitly create your own transaction, SaveChanges will not create a DbTransaction. You will not, however, create a System.Common.DbTransaction. Instead, when creating your own transactions, you need to use the System.Transaction.TransactionScope Object.
But there is no explanation ...
I am using Entity Framework 5.0. Could you help me understand in order to choose the right one for my application? It would be ideal to show me good patterns of use.
Thanks in advance!
Note. I plan this because of the escalation of transactions in DTC for the Oracle data provider.
c # entity-framework transactions dbcontext transactionscope
Learningner
source share