我想在 EF 中建立视图之间的关系。我正在关注这篇文章以在 xml 文件中对其进行修改。 http://smehrozalam.wordpress.com/2009/08/12/entity-framework-creating-a-model-using-views-instead-of-tables/。
我收到错误,
Custom tool error: Multiplicity is not valid in Role 'VIEW' in relationship 'FK_'. Because the Dependent Role refers to the key properties, the upper bound of the multiplicity of the Dependent Role must be 1.
我不确定我是否走在正确的道路上。
这样做的主要目的是在 oData 上使用这个实体,并在视图中链接到 Id。我没有直接使用表,因为表有 ID,我希望将名称发送回客户端。关系应该给孩子详细信息。
如果有任何其他方法可以实现这一点,请帮助!
提前致谢