Esempio n. 1
0
        public static int InsertUser(User user)
        {
            Context.Users.AddObject(user);
            Context.SaveChanges();

            return(user.ID);
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,Name,Email,Birth,Married,Memo")] Member member)
 {
     if (ModelState.IsValid)
     {
         db.Entry(member).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(member));
 }