如果我有以下型号:
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 吗?