예제 #1
0
        public IActionResult Delete(int id)
        {
            InvoiceRepo deleteInvoiceRepo = new InvoiceRepo(_context);

            var success = deleteInvoiceRepo.Delete(id);

            if (success)
            {
                return(RedirectToAction(nameof(Index)));
            }

            ViewBag.Error = "An error occurred while deleting this invoice. Please try again.";
            return(View());
        }
예제 #2
0
 public void Remove(Invoice t)
 {
     repo.Delete(t);
 }