コード例 #1
0
 public List <ExchageRate> GetMoneyExchangeList()
 {
     using (MoneyChangerEntities entities = new MoneyChangerEntities())
     {
         var moneyExchangeList = entities.ExchageRates.ToList();
         return(moneyExchangeList);
     }
 }
コード例 #2
0
 public ExchageRate GetMoneyExchange(string currencyType)
 {
     using (MoneyChangerEntities entities = new MoneyChangerEntities())
     {
         var moneyExchangeList = entities.ExchageRates.Where(a => a.CurrencyCode == currencyType).FirstOrDefault();
         return(moneyExchangeList);
     }
 }