public ActionResult Delete(int id) { var manufacturer = _manufacturerManager.GetById(id); try { if (_manufacturerManager.Remove(manufacturer)) { ViewBag.Msg = "Deleted successfully!"; return(View("Search")); } } catch (Exception exception) { //return HttpNotFound(); ViewBag.Msg = exception.GetType().ToString(); } return(View("Search")); }
public ActionResult DeleteConfirmed(long id) { _manufacturerManager.Remove(id); return(RedirectToAction("Index")); }