public Task <Response> Handle(Request request, CancellationToken cancellationToken)
 {
     return(Task.FromResult(new Response()
     {
         Company = CompanyDto.FromCompany(_eventStore.Query <Company>(request.CompanyId))
     }));
 }
Ejemplo n.º 2
0
            public Task <Response> Handle(Request request, CancellationToken cancellationToken)
            {
                //if (RandomNumberFactory.Create() > 14) throw new Exception();

                return(Task.FromResult(new Response()
                {
                    Companies = _eventStore.Query <Company>()
                                .Where(x => x.Status == CompanyStatus.Active)
                                .Select(x => CompanyDto.FromCompany(x)).ToList()
                }));
            }