我在 web api 中使用 v4 的 oData。
我的 get all 调用正确地返回了整个集合(总共 3 个对象)。
http://localhost:9910/api/CommandsRest
但试图只选择 StoreCommand 给了我 3 个空白对象
http://localhost:9910/api/CommandsRest?$select=StoreCommand
试图扩展 StoreCommand 给了我 StoreCommand 但没有给我它的导航属性
http://localhost:9910/api/CommandsRest?$expand=StoreCommand
我只想要主对象的 StoreCommand 属性及其所有导航属性。