Exemplo n.º 1
0
        public async Task EditBillAsync(EditBillModel model)
        {
            Bill bill = await _billRepository.FirstOrDefaultAsync(model.ID);

            if (bill == null)
            {
                throw new InvalidOperationException("该类型不存在");
            }
            model.CopyProperties(bill);
            _unitOfWork.RegisterEdit(bill);
            await _unitOfWork.CommitAsync();
        }