快捷搜索:  as  2018  FtCWSyGV  С˵  test  xxx  Ψһ  w3viyKQx

和记娱乐手机app下载_机器人论坛



在.NET 1.x中,我们基础是经由过程ADO.NET实现对不合数据库造访的事务。.NET 2.0为了带来了全新的事务编程模和记娱乐手机app下载式,因为所有事务组件或者类型均定义在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 Transacti和记娱乐手机app下载on : IDisposable, ISerializable

3: {

4:public event TransactionCompletedEventHandler TransactionCompleted;

5:

6:public Transaction Clone();

7:public DependentTransaction DependentClone(DependentCloneOption cloneOption);

8:

9:public Enlistmen和记娱乐手机app下载t EnlistDurable(Guid resourceManagerIdentifier, IEnlistmentNotification enlistmentNotification, EnlistmentOptions enlistmentOptions);

10:public Enlistment EnlistDurable(Guid resourceManagerIdentifier, ISinglePhaseNotification singlePhaseNo和记娱乐手机app下载tification, 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和记娱乐手机app下载:

22:public IsolationLevel IsolationLevel { get; }

23:public TransactionInformation TransactionInformation { get; }

24: }

您可能还会对下面的文章感兴趣: