public async Task <List <Event <T> > > GetEventsAsync <T>(string streamName, Guid streamId)
        {
            streamName = streamName.ToLower();
            AggregateResponse <T> events = await _aggregatesClient.GetAsync <T>(streamName, streamId);

            return(events.Events.Select(x => new Event <T>
            {
                Data = x.Data
            }).ToList());
        }
Example #2
0
        static async Task ReadAggregate()
        {
            HttpResponseMessage getResponse = await _aggregatesClient.GetAsync("movement", AGGREGATE_ID);

            Console.WriteLine(await getResponse.Content.ReadAsStringAsync());
        }