Example #1
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            var deletedItem = await _invoicesRepository.DeleteItemAsync(id);

            if (deletedItem != null)
            {
                return(RedirectToAction("Details", "Invoices", new { id = deletedItem.InvoiceId }));
            }
            else
            {
                return(RedirectToAction("Index", "Invoices"));
            }
        }