public async Task <bool> AddAsync(core.Repayment Repayment)
        {
            if (await RepaymentExists(Repayment.UNITID))
            {
                return(false);
            }
            var newRepayment = Repayment.ToDataObject();

            _context.Repayment.Add(newRepayment);
            return(_context.ChangeTracker.HasChanges());
        }
        public async Task <bool> UpdateAsync(core.Repayment Repayment)
        {
            if (!await RepaymentExists(Repayment.UNITID))
            {
                return(false);
            }
            var upRepayment = Repayment.ToDataObject();

            _context.Repayment.Update(upRepayment);

            _context.Update(upRepayment);
            return(_context.ChangeTracker.HasChanges());
        }