public ActionResult Edit(Visit visit) { dbv.Entry(visit).State = System.Data.Entity.EntityState.Modified; dbv.SaveChanges(); return(RedirectToAction("Index", new { id = Session["userID"] })); }
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(); } }