public async Task <IActionResult> DeleteConfirmed(int id) { var transaction = await _transactionsRepository.Get(id); _transactionsRepository.Delete(transaction); return(RedirectToAction(nameof(Index))); }
public async Task <IActionResult> Remove(int id, int fromAnotherPage) { await _transactions.Delete(id); await FillRequiredViewBagData(); if (fromAnotherPage == 0) { return(View("Index")); } else { return(RedirectToAction("Index", "Report")); } }
public async Task <IActionResult> Delete(int?id) { if (id == null) { return(NotFound()); } var transaction = await _transactionRepository.Delete(id); if (transaction == null) { return(NotFound()); } return(View(transaction)); }
public void Delete([FromRoute] long id) { repository.Delete(id); }
public Transaction Delete(Transaction transaction) { return(_transactionRepository.Delete(transaction)); }