public void ApplyUpdates(object container, TElement obj) { if (null != this.EntityUpdates) { this.EntityUpdates.Run(container, obj); this.EntityUpdates = null; } }
public EntityUpdation(Expression <Func <TContainer, IEnumerable <TElement> > > collectionSelector, Action <TElement, TContainer> entityUpdateReferencingParent, IModification[] innerUpdates) { this.FieldReference = new FieldReference <TContainer, TElement>(collectionSelector); this.EntityUpdates = new EntityUpdateFunc <TElement, TContainer>(entityUpdateReferencingParent); if (null != innerUpdates) { EntityFieldModifications.AddRange(innerUpdates); } }
public EntityUpdation(Expression <Func <TContainer, TElement> > fieldSelector, Action <TElement> entityUpdate, IModification[] innerUpdates) { this.FieldReference = new FieldReference <TContainer, TElement>(fieldSelector); this.EntityUpdates = new EntityUpdateFunc <TElement, TContainer>(entityUpdate); if (null != innerUpdates) { EntityFieldModifications.AddRange(innerUpdates); } }