public ActionResult Edit([Bind(Include = "ClientID,FirstName,LastName,Address,City,State,Zipcode,EmailAddress,PhoneNumber")] Client client) { if (ModelState.IsValid) { db.Entry(client).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(client)); }
public ActionResult Edit([Bind(Include = "InstrumentID,Name,Type,ImageString,Price,ClientID")] Instrument instrument) { if (ModelState.IsValid) { db.Entry(instrument).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(instrument)); }
public ActionResult Edit([Bind(Include = "CustomerID,FirstName,LastName,Email")] Customer customer) { if (ModelState.IsValid) { db.Entry(customer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(customer)); }
public ActionResult Edit([Bind(Include = "MovieID,Title,Description")] Movie movie) { if (ModelState.IsValid) { db.Entry(movie).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(movie); }
public ActionResult Edit([Bind(Include = "RentalID,RentalDate,ReturnDate,CustomerID,MovieID")] Rental rental) { if (ModelState.IsValid) { db.Entry(rental).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CustomerID = new SelectList(db.Customers, "CustomerID", "FirstName", rental.CustomerID); ViewBag.MovieID = new SelectList(db.Movies, "MovieID", "Title", rental.MovieID); return(View(rental)); }