Esempio n. 1
0
 public ActionResult Edit(Category category)
 {
     _db.Entry(category).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Index"));
 }
 public Item Edit(Item item)
 {
     db.Entry(item).State = EntityState.Modified;
     db.SaveChanges();
     return(item);
 }
Esempio n. 3
0
 public ActionResult Edit(Item item, int CategoryId)
 {
     _db.Entry(item).State = EntityState.Modified;
     _db.SaveChanges();
     return(RedirectToAction("Index"));
 }
 public ActionResult Edit(Item item)               // updates the item after being routed to there by Get method
 {
     _db.Entry(item).State = EntityState.Modified; // (item) = routing parameter // Entry () = method, State = property // state updated to EntityState.Modified = tells Entity the entry has been updated
     _db.SaveChanges();                            // once state has been modified, we call SaveChanges
     return(RedirectToAction("Index"));
 }
Esempio n. 5
0
 public IActionResult Edit(Item item)
 {
     db.Entry(item).State = EntityState.Modified;
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
 public ActionResult Edit(Experience Experience)
 {
     db.Entry(Experience).State = EntityState.Modified;
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Esempio n. 7
0
 public void Update(Classification classification)
 {
     db.Entry(classification).State = EntityState.Modified;
     db.SaveChanges();
 }
Esempio n. 8
0
 public void UpdateLabel(Label label)
 {
     _db.Entry(label).State = EntityState.Modified;
     Save();
 }
Esempio n. 9
0
 public IActionResult Edit(Item item)
 {
     db.Entry(item).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }
Esempio n. 10
0
 public void Update(Item item)
 {
     _db.Entry(item).State = EntityState.Modified;
     _db.SaveChanges();
 }