Beispiel #1
0
 static public void Add(OrderDetail order)
 {
     using (var db = new OrderSQL())
     {
         db.OrderDetail.Add(order);
         db.SaveChanges();
     }
 }
 static public void Delete(String orderId)
 {
     using (var db = new OrderSQL())
     {
         var order = db.OrderDetail.Include("Items").SingleOrDefault(o => o.id == orderId);
         db.OrderDetail.Remove(order);
         db.SaveChanges();
     }
 }