Odata expand query result by default

前端 未结 2 1501
陌清茗
陌清茗 2021-01-22 11:29

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

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

2条回答
  •  渐次进展
    2021-01-22 11:52

    As an alternative, this can be accomplished with fluent api.

    builder.EntitySet("MyType").EntityType.Expand(SelectExpandType.Automatic, "ExpandedField1", "ExpandedField2");
    

提交回复
热议问题