回到目录

使用了4年的IRepository数据仓储接口,今天要改变了,对于这个数据仓储操作接口,它提倡的是简洁,单纯,就是对数据上下文的操作,而直正的数据上下文本身我们却把它忽略了,在我的IRepository接口里根本没有数据上下文对象,这是不完整的,也许你会说,我使用了基类,数据基类里有数据上下文,是的,我也是那样用的,但有时,这种方法有些死板了,真的,当你碰到IOC时,这种方式的短板就出来了,即,每个反射出来的Repository对象都是独立的,每个对象里的上下文也都是独立的,这是重点,由于上下文是独立的,所以,很多事我们都没法干,这包括<JOIN关联查询,非MSDTC的事务>,看了上面的这么多原因,所以,才决定,扩展我的IRepository接口,当然,严格说,这违背了面向对象的原则,接口不提倡扩展,只提倡新建,呵呵.

全新的IRepository接口

 /// <summary>
/// 基础的数据操作规范
/// </summary>
/// <typeparam name="TEntity"></typeparam>
public interface IRepository<TEntity>
where TEntity : class
{
/// <summary>
/// 设定数据上下文,它一般由构架方法注入
/// </summary>
/// <param name="unitOfWork"></param>
void SetDbContext(IUnitOfWork unitOfWork); /// <summary>
/// 添加实体并提交到数据服务器
/// </summary>
/// <param name="item">Item to add to repository</param>
void Insert(TEntity item); /// <summary>
/// 移除实体并提交到数据服务器
/// 如果表存在约束,需要先删除子表信息
/// </summary>
/// <param name="item">Item to delete</param>
void Delete(TEntity item); /// <summary>
/// 修改实体并提交到数据服务器
/// </summary>
/// <param name="item"></param>
void Update(TEntity item); /// <summary>
/// 得到指定的实体集合(延时结果集)
/// Get all elements of type {T} in repository
/// </summary>
/// <returns>List of selected elements</returns>
IQueryable<TEntity> GetModel(); /// <summary>
/// 根据主键得到实体
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
TEntity Find(params object[] id);
}

在 DbContext数据基类中的实现

       public void SetDbContext(IUnitOfWork unitOfWork)
{
this.Db = (DbContext)unitOfWork;
this.UnitWork = unitOfWork;
}

在IOC中的使用

      IUnitOfWork db;
IRepository<Question_Info> question_InfoRepository;
public EFController()
{ //反射出仓储对象
db = ServiceLocator.Instance.GetService<IUnitOfWork>();
question_InfoRepository = ServiceLocator.Instance.GetService<IRepository<Question_Info>>();
//为仓储对象设置上下文
question_InfoRepository.SetDbContext(db);
}

在写JOIN查询时,它是被支持的,因为它的数据上下文是同一个

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAd0AAAC+CAIAAAD/SEJ5AAAWOUlEQVR4nO2dP47bOhCH9zgLpPVJjNzAlzD2Di5SC6lygDRxqjhtkAOkiAsX274mN+ArbElDckiRsiRS9vfhAW8ty+SIf34ajsTJiwEAgJp4KW0AAABYoMsAAHWBLgMA1AW6DABQF+gyAEBdoMsAAHWBLgMA1AW6DABQF+gyAEBdoMsAAHWBLgMA1AW6DABQF/Xq8mn/emV/sr+4NFv/4IIcNublxby8mM1h/souzXbuaz2bzYvZHWetYwrK9nvpUTc9j3dFEYbmUVBt2m/745dmu20uM9goqVeXjTF6c5YdT0fzsjHnxaob1uW7lbs6XQ5c0cT93s3E4GwcVXtid8jau1muHpwN5YoW8AJE3UmN75l02veNkz4kkq5MP8k/etrPLkAr1OWinA/mZbdgfQvocnUsc0XCB7o028l0MF2XbzWKytWDS7JMy2fdYF2TLs12u705rJdmv9+nOa+jdVn/Yd9TM5Gny+eD5S0ed7e1/HF3W9q/CM/ruDO7g9m0x8MO2Wn/um/aG6h9uW6raMuNwM/Tb8np1/5i/XeMXOa5P3JtkPPBbA5m92JeNuawsxpKQTNeelPXQ9ZZ4ur9M0N0HSeN2b2YwyEtVqPY6eid/NszSRxsZ9rAFVmXo5QZGUsOcm0qDNXsTBx1IeMDtUunr2s6/2DOZaY1snpFQeMDDdJX/7o/uTeS6G0l5G16FakmXZrttjk1++ZiLk1z6oMKQ9f+Gh+KbqP7/eQZO+cdLNtf3r2Yw7n/29WWs9kIwepE/LiLyNBpb3WFbAf18p2D4ud9l4vOjzeh1/nx1vb9ZeUyz2bTtVL791XWj8bsXszmcJPpSIPEjLcORi8vbfgcNq4u367xOHhD9e1UdVmKYD/UrbDdsNH2cTlU+r/VwRAyXqjc9ed6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HSgy9lMk6AHACAAcYxsFF0mzQIATAf+cjZKIANdBoDpQJfHcGm27JcDgJkgjpEND/4AYFbwl7MJxZcRawCYBHQ5m8A/MUKAGQCmgThGNkP/xAgAwF3gL+ei/dNFBDEAYDrQ5QzYhw0AC0AcAwCgLvCXAQDqAl0GAKiLwnEMAABwwF8GAKiL/wEJs5legAaA2gAAAABJRU5ErkJggg==" alt="" />

回到目录

EF架构~豁出去了,为了IOC,为了扩展,改变以前的IRepository接口的更多相关文章

  1. EF架构~扩展一个分页处理大数据的方法

    回到目录 最近总遇到大数据的问题,一次性处理几千万数据不实际,所以,我们需要对大数据进行分块处理,或者叫分页处理,我在EF架构里曾经写过类似的,那是在进行BulkInsert时,对大数据批量插入时候用 ...

  2. EF架构~EF异步改造之路~仓储接口的改造

    回到目录 返回异步与并行目录 C#5.0带来了并行编程 {C#1.0托管代码→C#2.0泛型→C#3.0LINQ→C#4.0动态语言→C#5.0异步编程} 随着C#5.0在.net4.5出来之后,它们 ...

  3. EF架构~引入规约(Specification)模式,让程序扩展性更强

    回到目录 规约(Specification)模式:第一次看到这东西是在microsoft NLayer项目中,它是微软对DDD的解说,就像petshop告诉了我们MVC如何使用一样,这个规约模式最重要 ...

  4. EF架构~基于EF数据层的实现

    回到目录 之前写过关于实现一个完整的EF架构的文章,文章的阅读量也是满大的,自己很欣慰,但是,那篇文章是我2011年写的,所以,技术有些不成熟,所以今天把我的2014年写的EF底层架构公开一下,这个架 ...

  5. EF架构~通过EF6的DbCommand拦截器来实现数据库读写分离~终结~配置的优化和事务里读写的统一

    回到目录 本讲是通过DbCommand拦截器来实现读写分离的最后一讲,对之前几篇文章做了一个优化,无论是程序可读性还是实用性上都有一个提升,在配置信息这块,去除了字符串方式的拼接,取而代之的是sect ...

  6. EF架构~为EF DbContext生成的实体添加注释(T5模板应用)

    回到目录 相关文章系列 第八回 EF架构~将数据库注释添加导入到模型实体类中 第二十一回  EF架构~为EF DbContext生成的实体添加注释(T4模板应用) 第二十二回EF架构~为EF DbCo ...

  7. EF架构~数据分批批量提交

    回到目录 对于大数据量提交,包括插入,更新和删除,我始终不建议用EF自带的方法,因为它会增加与数据库的交互次数,一般地,EF的一个上下文在提交时会打开一个数据连接,然后把转换成的SQL语句一条一条的发 ...

  8. EF架构~CodeFirst数据迁移与防数据库删除

    回到目录 本文介绍两个概念,防数据库自动删除,这是由于在code first模式下,当数据实体发生变化时,会对原来数据库进行删除,并将新数据表添加进来,但这对于我们的运营环境数据库,是万万不能接受的, ...

  9. EF架构~CodeFirst生产环境的Migrations

    回到目录 Migrations即迁移,它是EF的code first模式出现的产物,它意思是说,将代码的变化反映到数据库上,这种反映有两种环境,一是本地开发环境,别一种是服务器的生产环境,本地开发环境 ...

随机推荐

  1. UI基础之UITextField相关

    UITextField *textF = [[UITextField alloc] init]; 1.字体相关 textF.text = @"文本框文字"; textF.textC ...

  2. ubuntu安装goldendict以及添加本地词典和在线词典

    软件在ubuntu软件中心安装就可以了, 关于网络词典, 推荐有道在线词典,网址http://dict.youdao.com/search?q=%GDWORD%&ue=utf8 添加方法:编辑 ...

  3. c++:string函数

    string类的构造函数:string(const char *s);    //用c字符串s初始化string(int n,char c);     //用n个字符c初始化此外,string类还支持 ...

  4. hadoop搭建初步总结

    1.安装JDK1.1上传运用软件FileZilla,将windows上的jdk压缩包放到linux的root目录下 1.2解压jdk #创建文件夹 mkdir /usr/java(不要挂在在" ...

  5. Evaluation Clustering methods

    There are many evaluation measures available like entropy, recall, precision, F-measure, silhouette ...

  6. Spring学习笔记 5. 尚硅谷_佟刚_Spring_自动装配

    1,回顾以前的做法 一个人有姓名,有住址,有一辆车.其中住址和车也是一个类,这种情况下不用自动装配是十分容易实现的 (1)Person类 package com.zsq; public class P ...

  7. Unity IOC容器的简单应用(转)

    转自:http://blog.csdn.net/wanzhuan2010/article/details/7763280 Unity是Unity是微软patterns& practices组用 ...

  8. HTML5中的 Canvas

    什么是Canvas? Canvas元素是HTML5的一部分,允许脚本语言动态渲染位图像.Canvas由一个可绘制地区HTML代码中的属性定义决定高度和宽度.JavaScript代码可以访问该地区,通过 ...

  9. erlang学习笔记(shell命令)

    erlang shell 命令: help(). 可以查看erlang shell内置命令. 比如:m(Mod),可以查看模块Mod. 待续..

  10. windows编程:第一个windows程序

    #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <windowsx.h> #include <math ...