public CryptocurrencyTable(int id, string CoinmarketcapID) : base(id) { //Everytime the original constructor is called let's try update current Market rate //This class is cached for 60 seconds, so the consturcor is called evey 60 seconds Money CurrentMarketPrice = CoinmarketcapHelper.GetCurrentExchangeRate(CoinmarketcapID, AppSettings.Site.CurrencyCode); if (CurrentMarketPrice != Money.Zero && CurrentMarketPrice != MarketPrice) { MarketPrice = CurrentMarketPrice; Save(); } }
private Money GetOriginalValueFromAPI(string currencyCode) { return(CoinmarketcapHelper.GetCurrentExchangeRate(CoinmarketcapID, currencyCode)); }