public void UpdateExchangeRate(int currentCurrencyId, int currencyId, decimal buy, decimal sell) { var exchangeRate = new CurrencyExchangeRateEF(currentCurrencyId, currencyId, buy, sell); _db.Entry(exchangeRate).State = EntityState.Modified; _db.SaveChanges(); }
public void CreateExchangeRate(int currentCurrencyId, int currencyId, decimal buy, decimal sell) { var exchangeRate = new CurrencyExchangeRateEF(currentCurrencyId, currencyId, buy, sell); _db.CurrencyExchanges.Add(exchangeRate); _db.SaveChanges(); }