public override void Process(RemovalContext context, AssociationInfo association, Entity removingObject, Entity target, Entity referencingObject, Entity referencedObject) { if (!context.Contains(target) && referencingObject != referencedObject) { throw new ReferentialIntegrityException(association, removingObject, referencingObject, referencedObject); } }
public bool Contains(Entity entity) { if (processedEntities.Contains(entity)) { return(true); } return(queue.TryGetValue(entity.TypeInfo, out var set) && set.Contains(entity) ? true : parent != null && parent.Contains(entity)); }
public bool Contains(Entity entity) { if (processedEntities.Contains(entity)) { return(true); } HashSet <Entity> set; if (queue.TryGetValue(entity.TypeInfo, out set) && set.Contains(entity)) { return(true); } return(parent != null && parent.Contains(entity)); }