次のモデルがある場合:
public class Customer
{
public int Id {get; set;}
public int CustomerTypeId {get; set;}
public virtual CustomerType {get; set;}
}
Dto は、次のように外部 ID を除外する必要があります。
public class CustomerDto
{
public int Id {get; set;}
public virtual CustomerType {get; set;}
}
また、Graphdiff を使用してオブジェクト グラフを更新する場合、EF は CustomerType が CustomerTypeId にマップされていることを認識しますか?