コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }