1.VProductContrast[] products = VProductContrast.FindAll().OrderBy(d=>d.ISort);升序
2.VProductContrast[] products = VProductContrast.FindAll().OrderByDescending(d=>d.ISort);降序
3.//按排序查询
IList<Order> orderlist = new List<Order>();
orderlist.Add(new Order("ISort", true)); true为升序 false降序
//查询条件
IList<SimpleExpression> paramlist = new List<SimpleExpression>();
paramlist.Add(Expression.Eq("CName", name));
paramlist.Add( Expression.Eq("CUserID", _userCode));
paramlist.Add( Expression.Eq("BISDelete", false));
VProductContrast[] products = VProductContrast.FindAll(paramlist, orderlist);
2.VProductContrast[] products = VProductContrast.FindAll().OrderByDescending(d=>d.ISort);降序
3.//按排序查询
IList<Order> orderlist = new List<Order>();
orderlist.Add(new Order("ISort", true)); true为升序 false降序
//查询条件
IList<SimpleExpression> paramlist = new List<SimpleExpression>();
paramlist.Add(Expression.Eq("CName", name));
paramlist.Add( Expression.Eq("CUserID", _userCode));
paramlist.Add( Expression.Eq("BISDelete", false));
VProductContrast[] products = VProductContrast.FindAll(paramlist, orderlist);