public EntityUpdate ToEntityUpdate() { var update = new EntityUpdate(this.Entity); update.Id = this.Id; if (PropertyUpdates != null) { foreach (var pu in PropertyUpdates) { update.Set(pu.Name, pu.Value); } } if (RelationUpdates != null) { foreach (var ru in RelationUpdates) { var r = new RelationUpdate(ru.Entity, ru.Role, ru.Operation, ru.Id); if (ru.PropertyUpdates != null) { foreach (var pu in ru.PropertyUpdates) { r.Set(pu.Name, pu.Value); } } update.RelationUpdates.Add(r); } } return(update); }
public EntityUpdate ToEntityUpdate() { var update = new EntityUpdate(this.Entity); update.Id = this.Id; if (PropertyUpdates != null) foreach (var pu in PropertyUpdates) update.Set(pu.Name, pu.Value); if (RelationUpdates != null) foreach (var ru in RelationUpdates) { var r = new RelationUpdate(ru.Entity, ru.Role, ru.Operation, ru.Id); if (ru.PropertyUpdates != null) foreach (var pu in ru.PropertyUpdates) r.Set(pu.Name, pu.Value); update.RelationUpdates.Add(r); } return update; }