public void Update(int id, Balance value) { BalanceDBO updating = this.GetDBO(id); if (updating != null) { value.CopyTo(updating); _dbContext.SaveChanges(); } }
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); }
public BalanceDBO(Balance payment) { payment.CopyTo(this); }