<分区>
我有一个实体 A
,里面有 B
的集合。我用 _entity.A.Include(a => a.B)
现在我想通过自定义 OrderBy 将 B 分类到 A 中。我尝试了 _entity.A.Include(a => a.B.OrderBy(o => o.Version)
但我得到了:
The Include path expression must refer to a navigation property defined on the type. Use dotted paths for reference navigation properties and the Select operator for collection navigation properties.
关于如何实现这一点有什么想法吗?
谢谢。
版本是一个整数。