示例#1
0
 internal void SubmitChanges()
 {
     // Todo: refactor
     // Submit changes is no longer transactional, like in LinqToSql,
     // however this method is preserved because of the published event.
     grangerSimpleDb.Save();
     OnCreaturesModified?.Invoke(this, new EventArgs());
 }
示例#2
0
 internal void DeleteCreatures(CreatureEntity[] creatures)
 {
     foreach (var creatureEntity in creatures)
     {
         grangerSimpleDb.Creatures.Remove(creatureEntity.Id);
     }
     grangerSimpleDb.Save();
     OnCreaturesModified?.Invoke(this, new EventArgs());
 }
示例#3
0
 public void InsertCreature(CreatureEntity creature)
 {
     grangerSimpleDb.Creatures[creature.Id] = creature;
     grangerSimpleDb.Save();
     OnCreaturesModified?.Invoke(this, new EventArgs());
 }