コード例 #1
0
ファイル: CryptoCurrencies.cs プロジェクト: mateiasi1/Crypto
        public async Task <ActionResult <CryptoCurrency> > DeleteCurrency(int id)
        {
            ResponseDTO <CryptoCurrencyDTO> response = new ResponseDTO <CryptoCurrencyDTO>();
            ListDTO <CryptoCurrencyDTO>     list     = new ListDTO <CryptoCurrencyDTO>();

            list          = _currenciesManager.DeleteCryptoCurrency(id);
            response.Data = new ListDTO <CryptoCurrencyDTO>();
            if (list != null)
            {
                response.Data    = list;
                response.Message = "List is retrieved successfully";
                response.Success = true;
                return(Ok(response));
            }
            response.Data    = null;
            response.Message = "List is not retrieved successfully";
            response.Success = false;

            return(NotFound(response));
        }
コード例 #2
0
ファイル: CryptoCurrencies.cs プロジェクト: mateiasi1/Bank
        public async Task <ActionResult <CryptoCurrency> > DeleteCurrency(int id)
        {
            _currenciesManager.DeleteCryptoCurrency(id);

            return(Ok());
        }