public Product EditProduct(Product product) { db.Products.Attach(product); var entry = db.Entry(product); entry.Property(x => x.AverageRating).IsModified = true; db.SaveChanges(); return(product); }
public IActionResult Edit(Product product) { if (ModelState.IsValid) { db.Entry(product).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(product)); }
public IActionResult Edit(Experience experience) { //var thisPersonId = Int32.Parse(Request.Form["People"]); //var thisPerson = db.People.FirstOrDefault(People => People.PersonId == thisPersonId); //thisPerson.ExperienceId = experience.ExperienceId; //var thisExperiencePeople = new ExperiencePeople { }; //thisExperiencePeople.ExperienceId = experience.ExperienceId; //thisExperiencePeople.PersonId = thisPerson.PersonId; //db.ExperiencePeople.Add(thisExperiencePeople); db.Entry(experience).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public IActionResult Edit(Review review) { db.Entry(review).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public Product Edit(Product product) { db.Entry(product).State = EntityState.Modified; db.SaveChanges(); return(product); }
public IActionResult Edit(Gummi gummi) { db.Entry(gummi).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public Review Edit(Review product) { db.Entry(product).State = EntityState.Modified; db.SaveChanges(); return(product); }
public IActionResult Edit(Category category) { db.Entry(category).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }
public IActionResult Edit(Location location) { db.Entry(location).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); }