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)); }
public async Task <ActionResult <CryptoCurrency> > DeleteCurrency(int id) { _currenciesManager.DeleteCryptoCurrency(id); return(Ok()); }