Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "fname,lname,phone,mailid,pwd")] user user)
 {
     if (ModelState.IsValid)
     {
         db.Entry(user).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(user));
 }
Exemplo n.º 2
0
        public void Update(Societe societe)
        {
            using (var db = new modelEntities1())
            {
                var original = db.Societe.Find(societe.Id);

                if (original != null)
                {
                    db.Entry(original).CurrentValues.SetValues(societe);
                    db.SaveChanges();
                }
            }
        }