private async Task PersistAllUncommittedEvents(PayAsYouGoRepository repo) { await repo.Save(account1); await repo.Save(account2); await repo.Save(account3); await repo.Save(account4); await repo.Save(account5); }
Import_test_data_for_temporal_queries_and_projections_example_in_the_book() { using (var con = EventStoreConnection.Create(connectionString)) { await con.ConnectAsync(); var es = new GetEventStore(con); var repo = new PayAsYouGoRepository(es); Create5EmptyAccounts(); SimulateCustomerActivityFor3rdJune(); SimulateCustomerActivityFor4thJune(); SimulateCustomerActivityFor5thJune(); await PersistAllUncommittedEvents(repo); } }