我现在的代码是这样的,在前端没有反应。
                    if (!string.IsNullOrEmpty(time))
                    {
                        if (time == "0")//代表倒序
                        {
                            orderList.OrderByDescending(m => m.AddDate);
                        }
                        else//正序
                        {
                            orderList.OrderBy(m => m.AddDate);
                        }
                    }"AddDate": "2015-12-29T18:30:55.327",这个是时间

解决方案 »

  1.   

    var orderedList = orderList.OrderBy(m => m.AddDate);
    这个orderedList才是排序后的集合
      

  2.   

    var orderedList = orderList.OrderBy(m => m.AddDate);
      

  3.   

      if (!string.IsNullOrEmpty(time))
                        {
                            if (time == "0")//代表倒序
                            {
                              orderList=  orderList.OrderByDescending(m => m.AddDate).ToList();
                            }
                            else//正序
                            {
                             orderList=   orderList.OrderBy(m => m.AddDate).ToList();
                            }
                        }这个和 str.Replace("2","B") 后 str值不变是一个道理