【发布时间】:2015-03-05 06:43:49
【问题描述】:
查看设置 Web API odata 并尝试将数据从我们的 edmx 公开给它。问题是,每次我向 OdataConventionBuilder 添加实体时,我都会在加载时收到一条令人讨厌的错误消息:
The complex type 'MyData.AssetReading' refers to the entity type 'MyData.Asset' through the property 'Asset'
似乎在 edmx 中定义的关系正在轰炸 webapi odata 关于复杂类型。关于如何解决这个问题的任何想法,因为 edmx 非常庞大,并且几乎不可能对其进行重新调整。是否需要在 Builder.EntitySet 或 MapOdataRoute 方法上设置属性?
【问题讨论】:
标签: entity-framework asp.net-web-api odata edmx asp.net-web-api-odata