using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace RoadFlow.Data { public interface IRoadFlowRepository { /// /// 获取所有的数据对象并缓存 /// /// List GetAll(); /// /// 按Id获取一个对象 /// /// /// T GetOneById(string id); /// /// 按条件获取一个对象 /// /// /// T GetOneBy(Predicate predicate); /// /// 按条件获取列表 /// /// /// List GetListBy(Predicate predicate); /// /// 增加对象 /// /// /// int Add(T t); /// /// 增加多个对象 /// /// /// int AddRangeList(List ts); /// /// 更新对象 /// /// /// int Update(T t,bool clearCache=true); /// /// 更新多个对象 /// /// /// int Update(List ts, bool trans = true); /// /// 删除对象(物理) /// /// /// int Delete(T t); /// /// 删除一批对象(物理) /// /// /// int Delete(List ts); /// /// 按条件删除对象 /// /// /// int DeleteBy(System.Linq.Expressions.Expression> expression); /// /// 清空缓存 /// void ClearCache(); /// /// 清空缓存 /// void ClearCache(string id); } }