public ActionResult Edit(Flavor Flavor, int TreatId) { if (TreatId != 0) { _db.FlavorTreats.Add(new FlavorTreat() { TreatId = TreatId, FlavorId = Flavor.FlavorId }); } _db.Entry(Flavor).State = EntityState.Modified; _db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(Treat Treat) { _db.Entry(Treat).State = EntityState.Modified; _db.SaveChanges(); return(RedirectToAction("Index")); }