public ChangeSet GetChanges(Revision revision) { var changes = new ChangeSet(); changes.Inserts = RetriveInserts(revision); changes.Updates = RetriveUpdates(revision); changes.Deletes = RetriveDeletes(revision); return changes; }
public void CanUpdateChangeSet() { var slave = new TestTable(); var changeSet = new ChangeSet(); changeSet.Inserts = new[] {new Row(), new Row(), }; changeSet.Updates = new[] { new Row(), new Row(), }; changeSet.Deletes = new[] { new Row(), new Row(), }; slave.Update(changeSet); Assert.AreEqual(changeSet.Inserts,slave.OnRetriveInserts); Assert.AreEqual(changeSet.Updates,slave.OnRetriveUpdates); Assert.AreEqual(changeSet.Deletes,slave.OnRetriveDeletes); }
public void Update(ChangeSet set) { InsertRows(set.Inserts); UpdateRows(set.Updates); DeleteRows(set.Deletes); }