public async Task <T> Find(string id) { var events = await this.eventStore.Load(id); if (!events.Any()) { // not found throw new Exception("not found"); } var aggregate = Factory.CreateFromEvents(id, events.ToArray()); return(aggregate); }
public async Task <T> Find(string id) { var events = await this.eventStore.Load(id); if (!events.Any()) { // not found throw new Exception("not found"); } var aggregate = Factory.CreateFromEvents(id, events.ToArray()); return(aggregate); }