ASP.NET MVC EF 02 数据库访问层的设计
时间:2021-07-01 10:21:17
帮助过:2人阅读
<summary>
/// 基仓储实现的方法
/// </summary>
/// <typeparam name="T"></typeparam>
public interface IBaseRepository<T>
where T :
class,
new()
{
//添加
T AddEntities(T entity);
//修改
bool UpdateEntities(T entity);
//删除
bool DeleteEntities(T entity);
//查询
IQueryable<T> LodeEntities(Func<T,
bool>
wherelambda);
//分页
IQueryable<T> LoadPagerEntities<S>(
int pageSize,
int pageIndex,
out int total, Func<T,
bool> wherelambda,
bool isAsc, Func<T, S>
orderByLambda);
}
ASP.NET MVC EF 02 数据库访问层的设计
标签: