What distinguishes the two
Could someone provide a brief illustration or simply explain which one to use when there is a distinct difference?
P.S. I'm using EF6 in my project. Although I've already read the material, it wasn't very helpful. Researched the examples as well, however they are more using
and now that MS has released this new
I discovered the solution in the Entity Framework 6 documentation:
Microsoft advises making use of the following new API methods with the release of EF6:
is still extremely well supported, however for the majority of EF6 users, it is no longer necessary.
is exclusively used for transactions connected to databases,
Additionally, allows "simple C# code" to also be transactional.
When using EF6 and simply doing database-related activities in transactions,
for combining C# code with database operations in a single transaction.
Those who continue to favor the
manner, it is advised that they look at its drawbacks, particularly in cloud scenarios (cloud scenarios do not support distributed transactions).
You can get more details at here.