public async Task <CoinReadDto> CreateCoinAsync(CoinCreateDto coin)
        {
            var coinEntity = _mapper.Map <Coin>(coin);

            _repositoryWrapper.Coin.CreateCoin(coinEntity);
            await _repositoryWrapper.SaveAsync();

            return(_mapper.Map <CoinReadDto>(coinEntity));
        }
        public async Task <ActionResult <CoinReadDto> > CreateCoin([FromBody] CoinCreateDto coin)
        {
            if (coin == null)
            {
                _logger.LogError("Coin object sent from client is null.");
                return(BadRequest("Coin object is null"));
            }

            var createdCoin = await _coinService.CreateCoinAsync(coin);

            return(CreatedAtRoute(nameof(GetCoinById), new { id = createdCoin.ID }, createdCoin));
        }