// *********************************************************************** // Assembly : OpenAuth.Domain // Author : yubaolee // Created : 10-25-2015 // // Last Modified By : yubaolee // Last Modified On : 10-25-2015 // *********************************************************************** // // Copyright (c) www.cnblogs.com/yubaolee. All rights reserved. // // 仓储接口 // *********************************************************************** using System; using System.Linq; using System.Linq.Expressions; namespace OpenAuth.Domain.Interface { public interface IRepository where T : class { T FindSingle(Expression> exp = null); IQueryable Find(Expression> exp = null); IQueryable Find(int pageindex = 1, int pagesize = 10, string orderby = "", Expression> exp = null); int GetCount(Expression> exp = null); void Add(T entity); /// /// 更新一个实体的所有属性 /// void Update(T entity); void Delete(T entity); /// /// 批量更新 /// void Update(Expression> exp, T entity); /// /// 批量删除 /// void Delete(Expression> exp); void Save(); } }