更新时间:2022-02-01 00:10:16
复杂类型的导航属性(参考其他实体)不支持。您必须使用位置
实体(拥有自己的表格),或从 Country $ c>位置(并添加由Steve Morgan提到的 [ComplexType]
属性。
Navigation properties (refering to other entities) on a complex type are not supported. You must either make your Location
an entity (with its own table) or remove the navigation property Country
from Location
(and add the [ComplexType]
attribute as mentioned by Steve Morgan).
修改
参考: http://msdn.microsoft.com/en-us/library/bb738472.aspx
复杂类型不能包含导航属性。
"Complex type cannot contain navigation properties."