Ejemplo n.º 1
0
            public async Task <IEnumerable <GoodsApiDTO> > Handle(
                [NotNull] ListOfGoodsQuery request,
                CancellationToken cancellationToken)
            {
                Guard.NotNull(request, nameof(request));

                var goodsList = await _goodsRepository
                                .GetAllAsync(cancellationToken)
                                .ConfigureAwait(false);

                return(goodsList.Select(_mapper.Map <GoodsApiDTO>));
            }