Пример #1
0
 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);
 }
Пример #2
0
        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);
        }