LINQ根据时间排序问题(OrderBy、OrderByDescending)
作者:互联网
直接上代码:
db.GetList<Draw2D>(x => x.ProductId == id && x.EditionNo == no) .OrderBy(x => x.CreateTime.Desc()) .ToList();
这个无法排序!!!
return db.GetList<Draw2D>(x => x.ProductId == id && x.EditionNo == no) .OrderByDescending(x => x.CreateTime) .ToList();
这个可以!
标签:OrderBy,ToList,no,OrderByDescending,GetList,LINQ,id 来源: https://www.cnblogs.com/stickcsharp/p/12509136.html