翔如菲菲

其实天很蓝,阴云总会散;其实海不宽,此岸连彼岸.

导航

2011年7月18日 #

设计自己的数据访问层(2)数据上下文基类

摘要: 接上篇数据上下文基类是上下文接口的实现类,其给出了接口的 部分实现,具体的上下文类可以继承自上下文基类上下文基类的代码如下: privateboolisInTransaction=false;privateboolisDirty=false;privateList<ScheduledAction>actions=newList<ScheduledAction>();privateIdentityMapidentityMap=newIdentityMap();protectedabstractIDataMapper<T>GetDataMapper<T&g 阅读全文

posted @ 2011-07-18 22:45 翔如飞飞 阅读(367) 评论(0) 推荐(0)

设计自己的数据访问层(1)抽象数据访问层的功能

摘要: 如下IDataDontext接口所示给出了数据访问层的数据上下文接口:View Code///<summary>///Themainruntimeinterfacebetweentheapplicationandthedataaccesslayer.Thisisthecentral///APItypeabstractingthenotionofapersistenceservice.///</summary>publicinterfaceIDataContext:IDisposable{///<summary>///Reportswhetherthis< 阅读全文

posted @ 2011-07-18 22:39 翔如飞飞 阅读(223) 评论(0) 推荐(0)