Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
 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));
 }