Пример #1
0
        public async Task <List <ContactResponse> > Handle(GetContactsForOrganisationRequest request, CancellationToken cancellationToken)
        {
            var response = new List <ContactResponse>();
            var contacts = await _contactQueryRepository.GetContactsForOrganisation(request.OrganisationId);

            if (contacts == null)
            {
                return(response);
            }
            return(Mapper.Map <List <ContactResponse> >(
                       contacts.Where(x => x.Status == ContactStatus.Live)));
        }