/// <summary> /// 根据条件查找 /// </summary> /// <returns></returns> public List <Entity> Query(Exp exp, ListArgs arg) { var list = from row in _data where exp == null || exp.IsMatch(row.Value.Data) //// TODO: orderby 如何处理? select row.Value; return(((arg != null) ? list.Skip(arg.Skip).Take(arg.Max) : list).ToList()); }
public IEnumerable <T> Query <T>(Exp exp = null, ListArgs arg = null) { return(_provider.Query <T>(exp, arg)); }
public virtual IEnumerable <T> Query <T>(Exp exp, ListArgs arg) { var list = DataSet[_zone].Query(typeof(T), exp, arg); return(list.Select(o => (T)o.Data)); }
/// <summary> /// 根据条件查找 /// </summary> /// <param name="type"></param> /// <param name="exp"></param> /// <param name="arg"></param> /// <returns></returns> public List <Entity> Query(Type type, Exp exp, ListArgs arg) { return(!_data.ContainsKey(type) ? new List <Entity>() : _data[type].Query(exp, arg)); }