Exemplo n.º 1
0
        public int CreateNew(Balance balance)
        {
            BalanceDBO dbo = new BalanceDBO(balance);

            _dbContext.Add(dbo);
            _dbContext.SaveChanges();
            return(dbo.Id);
        }
Exemplo n.º 2
0
        public void Delete(int id)
        {
            BalanceDBO removing = this.GetDBO(id);

            if (removing != null)
            {
                _dbContext.Balances.Remove(removing);
                _dbContext.SaveChanges();
            }
        }
Exemplo n.º 3
0
        public void Update(int id, Balance value)
        {
            BalanceDBO updating = this.GetDBO(id);

            if (updating != null)
            {
                value.CopyTo(updating);
                _dbContext.SaveChanges();
            }
        }