예제 #1
0
        public void Update(int id, Balance value)
        {
            BalanceDBO updating = this.GetDBO(id);

            if (updating != null)
            {
                value.CopyTo(updating);
                _dbContext.SaveChanges();
            }
        }
예제 #2
0
        public void CopyToCopiesAllFields()
        {
            var balance = new Balance()
            {
                Amount = 10, Date = DateTime.Now
            };
            var targetBalance = new Balance();

            balance.CopyTo(targetBalance);

            Assert.Equal(balance.Amount, targetBalance.Amount);
            Assert.Equal(balance.Date, targetBalance.Date);
        }
예제 #3
0
 public BalanceDBO(Balance payment)
 {
     payment.CopyTo(this);
 }