예제 #1
0
        public CoinsService(ICoinRepository coinRepository)
        {
            this.coinRepository = coinRepository;

            var coinDetails = coinRepository.List().ToList();

            coinDenominations = coinDetails.OrderByDescending(x => x.Value);
            coinTypeValues    = coinDetails.ToDictionary(x => x.CoinType, x => x.Value);
        }
예제 #2
0
 public IEnumerable <CoinDetail> GetCoins()
 {
     return(coinRepository.List());
 }