示例#1
0
        public async Task <ActionResult <Crypto> > PostCrypto(Crypto crypto)
        {
            ResponseDTO <CryptoDTO> response = new ResponseDTO <CryptoDTO>();
            ListDTO <CryptoDTO>     list     = new ListDTO <CryptoDTO>();

            try
            {
                var cryptoList = _cryptoManager.AddCrypto(crypto);
                return(Ok(_mapper.Map <IEnumerable <CryptoDTO> >(cryptoList)));
            }
            catch (Exception ex)
            {
                throw new System.Exception(ex.Message);
            }
        }
示例#2
0
        public async Task <ActionResult <Crypto> > PostCrypto(Crypto crypto)
        {
            var cryptoList = _cryptoManager.AddCrypto(crypto);

            return(Ok(_mapper.Map <IEnumerable <CryptoDTO> >(cryptoList)));
        }