public ActionResult Edit([Bind(Include = "Id,StartTime,EndTime,Status,Title")] Room room) { if (ModelState.IsValid) { db.Entry(room).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(room)); }
public void Update(User user) { _db.Entry <User>(user).State = EntityState.Modified; _db.SaveChanges(); }