public SimpleDataAccessor(CoinName coinName, IXISettings settings, ITangleAccessor tangleAccessor) { _coinName = coinName.Name; _tangleAccessor = tangleAccessor; _settings = settings; InitDB(); }
public RedirectToActionResult AddCoin(CoinName name) { coinRepository.AddCoin(name); userBalance.Add(coinRepository.Coins.Where(c => c.Name == name).FirstOrDefault().Nominal); return(RedirectToAction("Index")); }
public void SetQuantity(CoinName name, int count) { context.Coins.Where(c => c.Name == name).FirstOrDefault().Count = count; context.SaveChanges(); }
public void DeleteCoin(CoinName name) { context.Coins.Where(c => c.Name == name).FirstOrDefault().Count += 1; context.SaveChanges(); }