public async Task <ActionResult> Edit([Bind(Include = "ParkingID,Name,Address,Phone,IsOverNight,Website,OpenTime,Price,Lat,Lng")] Parking parking) { if (ModelState.IsValid) { db.Entry(parking).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(parking)); }
public async Task <ActionResult> Edit([Bind(Include = "UserID,Nickname,Avatar,Email,Password")] User user) { if (ModelState.IsValid) { db.Entry(user).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(user)); }
public async Task <ActionResult> Edit([Bind(Include = "CommentID,ParkingID,UserID,Rating,Title,Content,Time")] Comment comment) { if (ModelState.IsValid) { db.Entry(comment).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(comment)); }