public void UpdateCoin(CoinBL element) { if (element != null && DB.CoinsLocal.Any(x => x.CoinId.Equals(element.CoinId))) { DB.Coins.Update(element.CoinDB); DB.Save(); } else { } }
public void AddCoin(CoinBL element) { DB.Coins.Create(Mapper.Map <Coin>(element)); DB.Save(); }