This article is a mirror article of machine translation, please click here to jump to the original article.

View: 33568|Reply: 4

[Source] EF6 uses Database.BeginTransaction to manage transactions

[Copy link]
Posted on 4/8/2017 8:52:23 PM | | | |
Previous lesson content

Handling concurrent Timestamp and ConcurrencyCheck distinction
http://www.itsvse.com/thread-3616-1-1.html
(Source: Architect)




We insert two identical pieces of data and update two pieces of data separately, both with transactional functions, the code is as follows:



We make the first transaction able to execute the business logic code normally;
We deliberately throw exceptions in the second transaction to see if it can be rolled back normally.

The test result shows that transaction 1 has no abnormalities and the update is successful. Transaction 2, throw an exception, fail to update, and roll back.

Source code download:

Tourists, if you want to see the hidden content of this post, pleaseReply







Previous:Handling concurrent Timestamp and ConcurrencyCheck distinction
Next:Bulk submission and transaction processing in Entity Framework
 Landlord| Posted on 4/8/2017 10:10:16 PM |
Bulk submission and transaction processing in Entity Framework
http://www.itsvse.com/thread-3618-1-1.html
(Source: Architect)
Posted on 7/20/2017 3:06:48 PM |
Come and take a look after registering
Posted on 8/17/2017 11:56:59 AM |
jjjjjjjjjjjjjjjjjjj
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com