Ejemplo n.º 1
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()
                }));
            }