//update public static void Update(Visiters visiters) { using (restaurantEntities db = new restaurantEntities()) { db.Entry(visiters).State = EntityState.Modified; db.SaveChanges(); } }
//delete public static void Delete(Visiters visiters) { using (restaurantEntities db = new restaurantEntities()) { db.Visiters.Remove(visiters); db.SaveChanges(); } }
//add public static Visiters Add(Visiters visiters) { using (restaurantEntities db = new restaurantEntities()) { visiters = db.Visiters.Add(visiters); db.SaveChanges(); return(visiters); } }