Esempio n. 1
0
 public IActionResult Delete(int id, Product product)
 {
     try
     {
         _productsService.DeleteById(id);
         return(RedirectToAction(nameof(Index)));
     }
     catch
     {
         return(View());
     }
 }
Esempio n. 2
0
 public HttpResponse Delete(int id)
 {
     productsService.DeleteById(id);
     return(this.Redirect("/"));
 }