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