查看设置 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 方法上设置属性?