Ejemplo n.º 1
0
        public int CreateNew(Payment payment)
        {
            PaymentDBO dbo = new PaymentDBO(payment);

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

            if (removing != null)
            {
                _dbContext.Payments.Remove(removing);
                _dbContext.SaveChanges();
            }
        }
Ejemplo n.º 3
0
        public void Update(int id, Payment value)
        {
            PaymentDBO updating = this.GetDBO(id);

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