Example #1
0
            public async Task <Result <GetCurrencyByIdResponse> > Handle(GetCurrencyByIdQuery query, CancellationToken cancellationToken)
            {
                var currency = await _repository.GetByIdAsync(query.Id);

                var mappedCurrency = _mapper.Map <GetCurrencyByIdResponse>(currency);

                return(Result <GetCurrencyByIdResponse> .Success(mappedCurrency));
            }
            public async Task <Result <GetCurrencyByIdResponse> > Handle(GetCurrencyByIdQuery query, CancellationToken cancellationToken)
            {
                var product = await _currency.GetByIdAsync(query.Id);

                var mappedProduct = _mapper.Map <GetCurrencyByIdResponse>(product);

                return(Result <GetCurrencyByIdResponse> .Success(mappedProduct));
            }