Odata默认扩展查询结果 [英] Odata expand query result by default

查看:71
本文介绍了Odata默认扩展查询结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用odata 5.7在响应中自动扩展嵌套实体?

Is there a way to auto expand nested entity in the response with odata 5.7?

因为默认情况下,我们必须添加?$ expand = myNestedEntity

Because by default we have to add ?$expand=myNestedEntity

推荐答案

在您的实体类定义中,使用

In your entity class definition, use the AutoExpand atttribute on the navigation properties you would like to have expanded.

这篇关于Odata默认扩展查询结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆