public ActionResult Edit([Bind(Include = "Id,FirstName,LastName,Address, Email")] RentalCustomer customer) { if (ModelState.IsValid) { db.Entry(customer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(customer)); }
public ActionResult Create(RentalCustomer customer) { if (ModelState.IsValid) { db.Customers.Add(customer); db.SaveChanges(); return(RedirectToAction("Index")); } return(View()); }