// GET: ProductController/Delete/5 public ActionResult Delete(string name) { _partsBL.DeleteProduct(_partsBL.GetProductByName(name)); return(RedirectToAction(nameof(Index))); }