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();

这个可以!

上一篇:Python数据分析:柱形图的绘制方法


下一篇:can't convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first