public ActionResult Delete(int id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var productFeature = _productFeatureRepository.GetById(id); _productFeatureRepository.Delete(id); _productFeatureRepository.Save(); return(RedirectToAction("Index", new { id = productFeature.ProductId })); }
public ActionResult DeleteConfirmed(int id, FormCollection collection) { _productFeatureRepository.Delete(id); _productFeatureRepository.Save(); return(RedirectToAction("Index", new { id = collection["productId"] })); }