All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
也谈,.NET2.0中避免分布式事务_.net资料_编程技术

Writer: aaa Article type: Programming skills(编程技巧) Time: 2013/12/18 8:06:39 Browse times: 323 Comment times: 0

也谈,.NET2.0中避免分布式事务_.net资料_编程技术


Head photo

Go homepage
Upload pictures
Write articles

也谈 .NET2.0中避免分布式事务_.net资料_编程技术-你的首页-uuhomepage.com
  .NET Framework 2.0 版中新增的 TransactionScope 单独使用确实很方便。但是在实际项目中都有自己的访问层,如何才能和自己的数据访问层结合起来使用呢?

  在项目中我是这样处理数据的:

/**////
/// 外包业务访问类
///

public class OutSourcingDAO
{

/**////
/// 增加
///

///
///
public int InsertGetIdentity(OutSourcing bt)
{
 return new DAHelper(DataAccess.Create()).InsertGetIdentity(bt);
}
/**////
/// 更新
///

///
///
public int Update(OutSourcing bt)
{
 return new DAHelper(DataAccess.Create()).Update(bt);
}
/**////
/// 删除
///

///
///
public int Delete(OutSourcing bt)
{
 return new DAHelper(DataAccess.Create()).Delete(bt);
}
}




There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.