예제 #1
0
 public ChangeSet GetChanges(Revision revision)
 {
     var changes = new ChangeSet();
     changes.Inserts = RetriveInserts(revision);
     changes.Updates = RetriveUpdates(revision);
     changes.Deletes = RetriveDeletes(revision);
     return changes;
 }
예제 #2
0
        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);
        }
예제 #3
0
 public void Update(ChangeSet set)
 {
     InsertRows(set.Inserts);
     UpdateRows(set.Updates);
     DeleteRows(set.Deletes);
 }