Beispiel #1
0
 public ActionResult Create(int?id, ProductFeature productFeature)
 {
     productFeature.ProductId = id.Value;
     _productFeatureRepository.Insert(productFeature);
     _productFeatureRepository.Save();
     return(RedirectToAction("Index", new { id = id.Value }));
 }
 public ActionResult Create(ProductFeature productFeature, int?id)
 {
     if (id == null)
     {
         return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
     }
     productFeature.ProductId = id.Value;
     _productFeatureRepository.Insert(productFeature);
     _productFeatureRepository.Save();
     return(RedirectToAction("Index", new { id = id.Value }));
 }