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
context.UpdateGraph(rootEntity, map => map .OwnedCollection(r => r.CollectionA, with => with .OwnedCollection(de => de.CollectionB) // this doesn't work because 'de' doesn't have 'CollectionB' ) );
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)