public void UpdateWalletOnDB() { List <WalletDbModel> walletList = new List <WalletDbModel>(); foreach (KeyValuePair <Currency, float> entry in this.wallet) { WalletDbModel m = new WalletDbModel(); m.Amount = entry.Value; m.Currency = entry.Key.Code; walletList.Add(m); } db.UpdateWalletDbModelList(walletList); }
public void AddWalletDbModel(WalletDbModel walletDBModel) { long s = database.Insert(walletDBModel); walletDBModel.ID = s; }