public ActionResult Edit([Bind(Include = "cid,CosmeticName,Company,Category,Quantity,Price")] Addcosmetic addcosmetic) { if (ModelState.IsValid) { db.Entry(addcosmetic).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(addcosmetic)); }
public ActionResult Edit([Bind(Include = "uid,Name,Location")] Adduser adduser) { if (ModelState.IsValid) { db.Entry(adduser).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(adduser)); }
public ActionResult Edit([Bind(Include = "fid,cid,uid")] Favorite favorite) { if (ModelState.IsValid) { db.Entry(favorite).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.cid = new SelectList(db.Addcosmetic, "cid", "CosmeticName", favorite.cid); ViewBag.uid = new SelectList(db.Adduser, "uid", "Name", favorite.uid); return(View(favorite)); }