public ActionResult Create(Opzione opzione) { if (ModelState.IsValid) { this.manager .SaveOpzione(opzione); } return RedirectToAction("Details", "Prodotti", new { id = opzione.ProdottoId } ); }
public void SaveOpzione(Opzione opzione) { this.db .Opzioni .Add(opzione); this.db.SaveChanges(); }