public ActionResult DeleteBrewery(FormCollection form) { if (form["operation"] == "Delete") { br.Delete(Convert.ToInt32(form["ID"])); } return(Redirect("/Breweries/ShowTable")); }
public ActionResult DeleteBrewery(FormCollection form) { if (form["operation"] == "Delete") { //List<Brewery> breweries = (List<Brewery>)Session["Breweries"]; //int index = breweries.FindIndex(a => a.ID == Convert.ToInt32(form["ID"])); //breweries.RemoveAt(index); //Session["Breweries"] = breweries; _br.Delete(int.Parse(form["id"])); } return(Redirect("/Breweries/ShowTable")); }
public void Delete(int id) { _repo.Delete(id); }
//<inheritdoc /> public void Delete(int id) { _repository.Delete(id); }