- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
System.Transactions事务详解[上篇]分析
System.Transactions事务详解[上篇]
在.NET 1.x中,我们基本是通过ADO.NET实现对不同数据库访问的事务。.NET 2.0为了带来了全新的事务编程模式,由于所有事务组件或者类型均定义在System.Transactions程序集中的System.Transactions命名空间下,我们直接称基于此的事务为System.Transactions事务。System.Transactions事务编程模型使我们可以显式(通过System.Transactions.Transaction)或者隐式(基于System.Transactions.TransactionScope)的方式进行事务编程。我们先来看看,这种全新的事务如何表示。
一、System.Transactions.Transaction
在System.Transactions事务体系下,事务本身通过类型System.Transactions.Transaction类型表示,下面是Transaction的定义:
1: [Serializable]
2: public class Transaction : IDisposable, ISerializable
3: {
4: public event TransactionCompletedEventHandler TransactionCompleted;
5:
6: public Transaction Clone();
7: public DependentTransaction DependentClone(DependentCloneOption cloneOption);
8:
9: public Enlistment EnlistDurable(Guid resourceManagerIdentifier, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions);
10: public Enlistment EnlistDurable(Guid resourceManagerIdentifier, ISinglePhaseNotification singlePhaseNotification, EnlistmentOptions enlistmentOptions);
11: public bool EnlistPromotableSinglePhase(IPromotableSinglePhaseNotification promotableSinglePhaseNotification);
12: public Enlistment EnlistVolatile(IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions);
13: public Enlistment EnlistVolatile(ISinglePhaseNotification singlePhaseNotification, EnlistmentOptions enlistmentOptions);
14:
15: public void Rollback();
16: public void Rollback(Exception e);
17:
18: void ISerializable.GetObjectData(SerializationInfo serializationInfo, StreamingContext context);
19:
20: public static Transaction Current { get; set; }
21:
22: public IsolationLevel IsolationLevel { get; }
23: public TransactionInformation TransactionInformation { get; }
24: }
1、Transaction是可序列化的
从上面的定义我们可以看到,Transaction类型(在没有特殊说明的情况下,以下的Transaction类型指的就是System.Transactions.Transa
您可能关注的文档
最近下载
- 2025年【全国】汉字听写大会竞赛考试题(含答案).docx VIP
- 新高三第一次班主任会议,校长讲话:凝心聚力战高三,担当使命育栋梁.docx
- 《化学抛光和电解抛光》.ppt VIP
- 校园内施工安全教育课件.pptx VIP
- 某某村党群服务中心项目可行性研究报告.doc VIP
- 2023年电动自行车换电站相关项目可行性研究报告.docx VIP
- Q-CR 517.2-2023铁路工程喷膜防水材料 第2部分:喷涂橡胶沥青(OCR).pdf
- (王红)《遣戍伊犁日记》《叶柝纪程》录文.doc VIP
- 一种用硅藻土助滤剂废弃物制备纳米白炭黑的方法.pdf VIP
- 数字化转型之数据治理解决方案.pdf VIP
文档评论(0)