public async Task <ActionResult> Delete(long id) { try { var item = await _businessManager.DeletePayment(id); if (item == false) { return(NotFound()); } return(RedirectToAction(nameof(Index))); } catch (Exception er) { _logger.LogError(er, er.Message); return(BadRequest(er)); } }