public async Task <ActionResult <ExchangeRates> > AddExchangeRate(ExchangeRates exchangeRates)
        {
            _context.ExchangeRates.Add(exchangeRates);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetExchangeRates", new { id = exchangeRates.Id }, exchangeRates));
        }
Пример #2
0
        public async Task <ActionResult <Currencies> > AddCurrency(Currencies currencies)
        {
            _context.Currencies.Add(currencies);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetCurrencies", new { id = currencies.Id }, currencies));
        }