public ActionResult Edit([Bind(Include = "Id,Name,Birthday,Address,PhoneNumber,Email,Username,Password,Deleted,UserGroupId,AccessFailedCount")] User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(user)); }
public ActionResult Edit([Bind(Include = "Id,Name")] UserGroup userGroup) { if (ModelState.IsValid) { db.Entry(userGroup).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(userGroup)); }
public ActionResult Edit([Bind(Include = "Id,Name,Price,Quantity,Description,Image,CategoryId,CreatedDate,ModifiedDate,Deleted,Promotion")] Product product) { if (ModelState.IsValid) { product.ModifiedDate = DateTime.Now; db.Entry(product).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(product)); }