Exemplo n.º 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;
 }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public void Update(ChangeSet set)
 {
     InsertRows(set.Inserts);
     UpdateRows(set.Updates);
     DeleteRows(set.Deletes);
 }