久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

TransactionScope:它變得更好了嗎?

TransactionScope: Has it gotten better?(TransactionScope:它變得更好了嗎?)
本文介紹了TransactionScope:它變得更好了嗎?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

當 TransactionScope 首次出現時,我遇到了一些嚴重的問題,以使其在我的開發機器 (XP) 和我們的數據庫服務器 (Windows Server 2003) 之間工作.

When TransactionScope first came out, I ran into some serious issues getting it to work between my dev machine (XP) and our database server (Windows Server 2003).

當我深入研究它時,這似乎是一個棘手且普遍的問題,有可能成為生產中的一個頭疼問題,所以我決定不以這種方式處理事務(盡管我非常喜歡這種語法并且我真的很想讓它工作).

When I looked into it more, this appeared to be a tricky and widespread issue that had a chance of becoming a headache in production, so I decided not to handle transactions this way (even though I like the syntax a lot and I really wanted it to work).

這些問題是否仍然存在,或者使用起來是否安全?你現在經常使用它沒有問題嗎?

Are these problems still out there or is this safe to use? Do you use this regularly now without issues?

非常感謝!

注意:已經很久了,但我認為這個問題與 Distribute Transaction Coordinator 有關.我擺弄了很長時間,但始終無法讓它發揮作用.

Note: It has been a long time now, but I think the issue had something to do with Distribute Transaction Coordinator. I fiddled with it for a long time and was never able to get it working.

推薦答案

Rick Strahl 有一篇關于事務范圍和 LINQ to SQL 的精彩博文 此處.它的上下文更像是 LINQ to SQL,但我認為有一些適用的原則可以幫助您解決問題.

Rick Strahl has a great post about transaction scope and LINQ to SQL here. Its context is more LINQ to SQL, but I think that there are some principles that apply which could help you solve your question.

為了更具體地回答您的問題,以下是 Strahl 對 TransactionScope 的看法:

to more specifically answer your question, here's what Strahl has to say about TransactionScope:

傳統上 TransactionScope 是一個圍繞分布式事務協調器 (DTC) 的 .NET 包裝器,但它的功能有所擴展.一個問題是 DTC 在資源使用方面相當昂貴,并且它要求 DTC 服務實際運行在機器上(另一個服務在客戶端安裝時特別麻煩).

Traditionally TransactionScope was a .NET wrapper around the Distributed Transaction Coordinator (DTC) but it’s functionality has expanded somewhat. One concern is that the DTC is rather expensive in terms of resource usage and it requires that the DTC service is actually running on the machine (yet another service which is especially bothersome on a client installation).

但是,最近對 TransactionScope 和 SQL Server 客戶端驅動程序的更新使得可以使用 TransactionScope 類及其提供的易用性,而無需 DTC,只要您針對單個數據庫運行并使用單個一致的連接字符串

However, recent updates to TransactionScope and the SQL Server Client drivers make it possible to use TransactionScope class and the ease of use it provides without requiring DTC as long as you are running against a single database and with a single consistent connection string

這篇關于TransactionScope:它變得更好了嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

SQL Server 2005 Transaction Level and Stored Procedures(SQL Server 2005 事務級和存儲過程)
Yield return from a try/catch block(try/catch 塊的收益回報)
Should I call Parameters.Clear when reusing a SqlCommand with a transation?(重用帶有事務的 SqlCommand 時,我應該調用 Parameters.Clear 嗎?)
Does SqlTransaction need to have Dispose called?(SqlTransaction 是否需要調用 Dispose?)
Reason for System.Transactions.TransactionInDoubtException(System.Transactions.TransactionInDoubtException 的原因)
How do I use TransactionScope with MySql and Entity Framework? (getting Multiple simultaneous connections...are not currently supported error)(如何將 TransactionScope 與 MySql 和實體框架一起使用?(獲取多個同時連接...目前不
主站蜘蛛池模板: 一级毛片视频免费观看 | 91精品国产91久久久久久 | 久久成人久久 | 亚洲五码久久 | 日韩欧美一区二区三区 | 日韩视频在线免费观看 | 亚洲综合视频 | 午夜久草 | 亚洲成人精品影院 | 99re热精品视频国产免费 | 在线成人免费视频 | 中文字幕免费在线 | 亚洲综合色视频在线观看 | 日韩中文字幕在线观看视频 | 亚洲 欧美 日韩在线 | 超碰导航| 中文字幕在线免费观看 | 91精品国产91久久久久久密臀 | 精品成人 | 国产一级淫片a直接免费看 免费a网站 | 欧美国产一区二区 | 国产成人精品一区二区三区四区 | 91不卡 | 亚洲国产一区在线 | 91观看| 久久久精品 | 国产在线视频一区 | 精品三级在线观看 | 国产精品综合一区二区 | 欧美久久精品一级黑人c片 91免费在线视频 | 国产欧美日韩一区 | 国产精久久久久久 | 成人国产精品久久久 | 91精品国产手机 | 成年免费在线观看 | 亚洲国产一区二区在线 | 成人av免费 | 亚洲高清成人 | 午夜丰满寂寞少妇精品 | 欧美成人猛片aaaaaaa | 美国av毛片 |