是否可以让inversepperty引用复杂类型的属性?
这是一个人为的例子,显示了我想要做的结构:
public class MyType {
public MyName Name { get; set; }
}
[ComplexType]
public class MyName {
public int ProfileId {get; set;}
[ForeignKey("ProfileId")]
public Profile Profile{get; set;}
}
public class Profile
{
[InverseProperty("Name.Profile")]
public virtual IList<MyType> MyTypes{ get;set;}
}