Пример #1
0
 public Task <ICollection <Poll> > GetAllAsync()
 {
     return(_pollRepository.GetAllAsync());
 }
        public async Task <ServiceResponse <ICollection <PollDto> > > Handle(GetAllPollsQuery query, CancellationToken cancellationToken)
        {
            var polls = await _pollRepository.GetAllAsync();

            return(ServiceResponse <ICollection <PollDto> > .Success(_mapper.Map <ICollection <PollDto> >(polls)));
        }