public List <ExchageRate> GetMoneyExchangeList() { using (MoneyChangerEntities entities = new MoneyChangerEntities()) { var moneyExchangeList = entities.ExchageRates.ToList(); return(moneyExchangeList); } }
public ExchageRate GetMoneyExchange(string currencyType) { using (MoneyChangerEntities entities = new MoneyChangerEntities()) { var moneyExchangeList = entities.ExchageRates.Where(a => a.CurrencyCode == currencyType).FirstOrDefault(); return(moneyExchangeList); } }