public async Task CloseAsync(int id, int accountId) { var debt = await _debtRepository.GetItemAsync(id); await _createCloseDebtService.CloseAsync(id, accountId); await CreateClosedDebtPayingItem(debt); }
public async Task <ActionResult> Close(int id) { try { await _createCloseDebtService.CloseAsync(id); } catch (ServiceException e) { throw new WebUiException($"Ошибка в контроллере {nameof(DebtController)} в методе {nameof(Close)}", e); } return(RedirectToAction("DebtList")); }