导航查询第二层不是使用orderby进行排序吗? 返回

SqlSugar 沟通中
3 689
obj.list = entities
    .Includes(x => x.Detail, y => y.Param)
    .ToList();

试了下,第一层导航查询可以使用orderby,第二层程序就会报错

热忱回答(3)

  • fate sta fate sta VIP0
    2025/12/25

    提供完整代码

    0 回复
  • ISugarQueryable<AiAgrZbzWorkerBEntity> entities = Db.Queryable<AiAgrZbzWorkerBEntity>().OrderByDescending(it => it.insertdate);
    List<AiAgrZbzWorkerBEntity> list = entities.Includes(x => x.Detail, y => y.Param).ToList();

    @fate sta:相关的代码就这些了

    0 回复
  • fate sta fate sta VIP0
    2025/12/25

    目 前这个代码是可以的。需要完整可以重现的DEMO

    0 回复