C# OrderBy多个字段排序

C# OrderBy多个字段排序

先按Sort字段正序排序,再按CreateDate降序排序,

如果三个字段进行排序,我才是再后面再加ThenByDescending

var result = _IDbConnection.Query<QueryResponseGoods>(seSql.ToString(), request).OrderBy(a => a.Sort).ThenByDescending(b => b.CreateDate).ToList();

 

posted on 2022-10-28 17:50  Jankie1122  阅读(434)  评论(0编辑  收藏  举报