コード例 #1
0
        public ActionResult Edit(Visit visit)
        {
            dbv.Entry(visit).State = System.Data.Entity.EntityState.Modified;
            dbv.SaveChanges();

            return(RedirectToAction("Index", new { id = Session["userID"] }));
        }
コード例 #2
0
 private void AddDataInVisit(WelcomeModel user)
 {
     using (var db = new VisitContext())
     {
         db.Add(new VisitModel {
             timein = user.lastin, userid = user.id, timeout = DateTime.Now
         });
         db.SaveChanges();
     }
 }