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); }
public IEnumerable <CoinDetail> GetCoins() { return(coinRepository.List()); }