资讯
Using TransactionScope simplifies this code tremendously by enclosing every ADO.NET call within a transaction -- even when the call is inside another method. You need to add a reference to ...
transactionScope.Complete(); } } catch { //Write code here to handle exceptions } And that’s all you need to do. You can now execute your application and test your transactional services.
If you do need something different (to combine several SaveChanges calls into a single transaction or to combine EF code with ADO.NET code in a transaction), then your first choice should be the ...
当前正在显示可能无法访问的结果。
隐藏无法访问的结果