摘要:
IntroductionA popular pattern for ORM data access is the Repository pattern. Repositories are currently very popular even in EF for the reasons below:Hide EF from upper layerMake code better testableThe big disadvantage of EF is rigid architecture which can be hardly mocked, so if you want to unit t 阅读全文
posted @ 2013-01-06 16:25
Danny Chen
阅读(323)
评论(0)
推荐(0)
摘要:
大家还记得Entity Framework 4.1/4.3 之一(概念篇)中我介绍过ObjectContext ObjectSet 以及 DBContext 和DBSet的定义。在使用了4.0很长一段时间后,我向4.3进行了过渡,这个过渡的过程中,我认识并使用了 DBContext 和 DBSet 。感觉很不错。下面我通会表格来分别展示一下ObjectContext ObjectSet DBContext DBSet:DbContextAPI feature (DbContext API功能)Relevant EF4feature/class (有关EF4中的功能/类)General purp 阅读全文
posted @ 2013-01-06 11:09
Danny Chen
阅读(670)
评论(0)
推荐(0)