Пример #1
0
 public ActionResult Edit([Bind(Include = "Id,IdVote")] Vote vote)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vote).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(vote));
 }
Пример #2
0
 public ActionResult Edit([Bind(Include = "Id,Lastname,Firstname,Pwd")] User user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }
        public async Task <ActionResult> Edit([Bind(Include = "Id,IdResto,Name,Fone,Address")] Restaurant restaurant)
        {
            if (ModelState.IsValid)
            {
                db.Entry(restaurant).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(restaurant));
        }