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()); }
internal void DeleteCreatures(CreatureEntity[] creatures) { foreach (var creatureEntity in creatures) { grangerSimpleDb.Creatures.Remove(creatureEntity.Id); } grangerSimpleDb.Save(); OnCreaturesModified?.Invoke(this, new EventArgs()); }
public void InsertCreature(CreatureEntity creature) { grangerSimpleDb.Creatures[creature.Id] = creature; grangerSimpleDb.Save(); OnCreaturesModified?.Invoke(this, new EventArgs()); }