public ActionResult Edit([Bind(Include = "DeviceId,DeviceBrand,DeviceModel,DeviceColor,DeviceMemory")] Device device) { if (ModelState.IsValid) { db.Entry(device).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(device)); }
public ActionResult Edit([Bind(Include = "BrandId,BrandName")] Brand brand) { if (ModelState.IsValid) { db.Entry(brand).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(brand)); }