breezejs: navigation property not added to entity

天大地大妈咪最大 提交于 2019-12-02 04:37:27

You must define a foreign key as Breeze associations require FKs. http://www.breezejs.com/documentation/navigation-properties

[EDIT]

Your bi-directional association should look like this:

 public class Mandate
{
    public int Id { get; set; }
    public string PolicyNumber { get; set; }

    public virtual  ICollection<OpenPosition> OpenPositions { get; set; }
}

public class OpenPosition {
    public int Id { get; set; }
    public decimal Amount { get; set; }

    public int MandateId { get; set; }
    public Mandate Mandate {get; set; }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!