//下单 //更新订单状态 //PutTravelDiary 发布旅行日志 public static void saveOrder(order order) { using (var ctx = new hackthonEntities()) { ctx.AddToorders(order); ctx.SaveChanges(); } }
/// <summary> /// Create a new order object. /// </summary> /// <param name="orderID">Initial value of the orderID property.</param> public static order Createorder(global::System.Int32 orderID) { order order = new order(); order.orderID = orderID; return order; }
/// <summary> /// Deprecated Method for adding a new object to the orders EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToorders(order order) { base.AddObject("orders", order); }