public Task On(InsertEvent e) { return(_collection.InsertAsync(e, new MyReadModel() { Id = e.AggregateId.AsString(), Text = e.Text })); }
public Task On(SampleAggregateCreated e) { return(_collection.InsertAsync(e, new SampleReadModel() { Id = e.AggregateId.AsString(), IsInRebuild = base.IsRebuilding, Timestamp = DateTime.Now.Ticks })); }
public async Task On(SampleAggregateCreated e) { await _collection.InsertAsync(e, new SampleReadModel2() { Id = e.AggregateId.AsString(), IsInRebuild = base.IsRebuilding, Timestamp = DateTime.Now.Ticks }).ConfigureAwait(false); Thread.Sleep(10); }
public async Task On(SampleAggregateCreated e) { Console.WriteLine("Projected in thread {0} - {1}", Thread.CurrentThread.ManagedThreadId, Thread.CurrentThread.Name); Thread.Sleep(0); await _collection.InsertAsync(e, new SampleReadModel3() { Id = e.AggregateId.AsString(), IsInRebuild = base.IsRebuilding, Timestamp = DateTime.Now.Ticks }).ConfigureAwait(false); }