public static void Add(List <ChangeSetEntry> changeSetEntries) { Entity[] entities = changeSetEntries.Where(p => p.Entity.MetaType.HasComposition).Select(p => p.Entity).ToArray(); if (entities.Length == 0) { return; } UnmodifiedOperationAdder visitor = new UnmodifiedOperationAdder(changeSetEntries); foreach (Entity entity in entities) { visitor.Visit(entity); } }
/// <summary> /// Builds an operation list for the specified <see cref="EntityChangeSet"/>. /// </summary> /// <param name="changeSet">The <see cref="EntityChangeSet"/>.</param> /// <returns>The list of <see cref="ChangeSetEntry"/> for the specified <see cref="EntityChangeSet"/>.</returns> public static List <ChangeSetEntry> Build(EntityChangeSet changeSet) { CheckForInvalidUpdates(changeSet); // translate to an operation list List <ChangeSetEntry> operations = BuildOperations(changeSet); // recursively visit all composition relationships in the // changeset and add operations for unmodified children. UnmodifiedOperationAdder.Add(operations); // set the association maps for all operations in the changeset AssociationMapBuilder.Build(operations); return(operations); }
public static void Add(List<ChangeSetEntry> changeSetEntries) { Entity[] entities = changeSetEntries.Where(p => p.Entity.MetaType.HasComposition).Select(p => p.Entity).ToArray(); if (entities.Length == 0) { return; } UnmodifiedOperationAdder visitor = new UnmodifiedOperationAdder(changeSetEntries); foreach (Entity entity in entities) { visitor.Visit(entity); } }