public async Task When(TestEvent e, long checkpoint) { var doc = new TestModel { Id = e.Id, SomeValue = e.SomeValue }; var time = TimeProvider.GetUtcNow(); await Store.StoreAsync(doc); }
async Task When(OrganizationRegistered e, long checkpoint) { var doc = await Store.LoadAsync <Organization>(e.Id); if (doc == null) { doc = new Organization(); } doc.Id = e.Id; doc.Name = e.Name; doc.Address = e.Address; await Store.StoreAsync(doc); }