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 }));
        }
Exemplo n.º 2
0
 public ActionResult DeleteConfirmed(int id, FormCollection collection)
 {
     _productFeatureRepository.Delete(id);
     _productFeatureRepository.Save();
     return(RedirectToAction("Index", new { id = collection["productId"] }));
 }