sql - EF Navigation - map property to multiple tables -
i have column in table foreign key either of 2 tables , column saves table
noteid navigationtype navigationtypeid 1 order 1234 2 person 555 i need map navigationtypeid either order table or person table.
public int noteid { get; set; } public string navigationtype { get; set; } public int navigationtypeid { get; set; } public virtual order order{get;set;} public virtual person person {get;set;} i using system.data.entity.modelconfiguration mapping entities
this.hasoptional(t => t.quote) .withone(t => t.note) .hasforeignkey(d => d.navigationtypeid); is there way set entity framework mapping load navigation based on navigationtype?
Comments
Post a Comment