Пример #1
0
 //update
 public static void Update(CurrentEmployee currentEmployee)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.Entry(currentEmployee).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Пример #2
0
 //delete
 public static void Delete(CurrentEmployee currentEmployee)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.CurrentEmployee.Remove(currentEmployee);
         db.SaveChanges();
     }
 }
Пример #3
0
 //add
 public static void Add(CurrentEmployee currentEmployee)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.CurrentEmployee.Add(currentEmployee);
         db.SaveChanges();
     }
 }