示例#1
0
 public static void AddSpecialInvent(SpecialInvent specialInvent)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         db.SpecialInvent.Add(specialInvent);
         db.SaveChanges();
     }
 }
示例#2
0
 public static void DeleteSpecialInvent(SpecialInvent specialInvent)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         var o = db.SpecialInvent.Single(so => so.Id == specialInvent.Id);
         db.SpecialInvent.Remove(o);
         db.SaveChanges();
     }
 }
示例#3
0
 public static void UpdateSpecialInvent(SpecialInvent specialInvent)
 {
     using (restaurantEntities db = new restaurantEntities())
     {
         var o = db.SpecialInvent.Single(so => so.Id == specialInvent.Id);
         o.isContact = true;
         db.SaveChanges();
     }
 }