不成功的MVC Repository模式,记录下来,后面看看原因在哪里(一) IRepository类
2014-10-22 17:11
260 查看
public interface IRepository<T> where T:class { //增加 T Add(T entity); //更新 bool Update(T entity); //删除 bool Delete(T entity); //检查名字是否为空 bool CheckNameIsEmpty(Expression<Func<T, bool>> whereLambda); //检查名字是否存在 bool CheckNameExist(Expression<Func<T, bool>> whereLambda); //判断其他输入项是否都符合要求 bool Check(Expression<Func<T, bool>> whereLambda); //保存 //void Save(); //统计 int Count(Expression<Func<T, bool>> predicate); //强制类型转换列表 List<T> ToList(); //查找 T Find(Expression<Func<T, bool>> whereLambda); //条件查找 IQueryable<T> FindList(Expression<Func<T, bool>> whereLamba, string orderName, bool isAsc); //条件查找 IQueryable<T> FindList<S>(Expression<Func<T, bool>> whereLambda, bool isAsc, Expression<Func<T, S>> orderLamba); //条件查找 IQueryable<T> FindPageList<S>(int pageIndex, int pageSize, out int totalRecordCnt, Expression<Func<T, bool>> whereLamdba, bool isAsc, Expression<Func<T, S>> orderLambda); }
相关文章推荐
- 不成功的MVC Repository模式,记录下来,后面看看原因在哪里(二) Repository类
- 不成功的MVC Repository模式,记录下来,后面看看原因在哪里(五) 错误及可能原因
- 不成功的MVC Repository模式,记录下来,后面看看原因在哪里(三) IDevTypeRepository 及 DevTypeRepository
- 不成功的MVC Repository模式,记录下来,后面看看原因在哪里(四) 上下文 及 model表
- Service Unavailable的原因 遇到两次了 记录下来 方便查询
- SAS中修改一个表为编辑模式的时候不成功并给出警告的原因及解决办法
- [zz]我的软件推广成功之路[/zz]记下来先,以后再仔细看看行不行
- jQuery AJAX中的$.ajax()方法请求成功却始终进入error问题的解决方案及原因记录
- 活动目录向DNS注册SRV记录不成功的原因
- MFC 平直度检测数据转换不成功原因记录
- 微网页开发弹出“非微信官方网页 转换为手机预览模式”原因记录
- 可以看看 确实有道理 只是做得到做不到的问题,这就是成功人这么少的原因
- 记录微信分享不成功的可能原因
- 最近想写一个邮箱自动验证功能,在网上看了很多,写到自己上面出了很多问题,记录下来给后面的人一个参考
- 把读过的书记录下来。很多年以后再看看这个书单,应该很有趣~
- 发现个横屏模式小问题,记录下来
- 最近想写一个邮箱自动验证功能,在网上看了很多,写到自己上面出了很多问题,记录下来给后面的人一个参考
- 使用xcode git pull成功一些文件没有下载下来的原因
- MM与23种设计模式的比较(存下来慢慢看)
- 客户自行更改了aspnet用户权限,结果整个网站不能用。查找了资料记录下来