public Task Save(IPersistableEntity dataToSave) { Log("Saving single ", dataToSave); try { return(persistableEntityRepository.Save(dataToSave)); } catch (Exception e) { Log("couldn't save", e); throw; } }
protected override Task WriteMessagesAsync(IEnumerable <Akka.Persistence.AtomicWrite> messages) { var batch = new List <JournalEntry>(); foreach (IPersistentRepresentation message in messages) { Console.WriteLine("saving msg for Persistence Id:" + message.PersistenceId); batch.Add(new JournalEntry(message.PersistenceId, message.SequenceNr, message)); } await repository.Save(batch); }