我有一些模特:
public class RootEntity
{
public int Id {get; set;}
public virtual ICollection<AbstractEntity> CollectionA {get; set;}
}
public abstract class AbstractEntity
{
public int Id {get; set;}
}
public class DerivedEntityA : AbstractEntity
{
public virtual ICollection<AnotherType> CollectionB {get; set;}
}
public class DerivedEntityB : AbstractEntity
{
public string Name {get; set;}
}
上述模型的关系如下:
RootEntity ---> ICollection<AbstractEntity>
┗━━ DerivedEntityA ---> ICollection<AnotherType>
┗━━ DerivedEntityB
---> has a
┗━━ derived from
现在,我想使用GraphDiff更新名为RootEntity
的{{1}}实体:
rootEntity
那我怎样才能正确更新呢?