Ejemplo n.º 1
0
 /// <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;
 }
Ejemplo n.º 2
0
        private void FixupOrder(Order previousValue)
        {
            if (IsDeserializing)
            {
                return;
            }

            if (previousValue != null && previousValue.Order_Details.Contains(this))
            {
                previousValue.Order_Details.Remove(this);
            }

            if (Order != null)
            {
                if (!Order.Order_Details.Contains(this))
                {
                    Order.Order_Details.Add(this);
                }

                OrderID = Order.OrderID;
            }
            if (ChangeTracker.ChangeTrackingEnabled)
            {
                if (ChangeTracker.OriginalValues.ContainsKey("Order")
                    && (ChangeTracker.OriginalValues["Order"] == Order))
                {
                    ChangeTracker.OriginalValues.Remove("Order");
                }
                else
                {
                    ChangeTracker.RecordOriginalValue("Order", previousValue);
                }
                if (Order != null && !Order.ChangeTracker.ChangeTrackingEnabled)
                {
                    Order.StartTracking();
                }
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Orders EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToOrders(Order order)
 {
     base.AddObject("Orders", order);
 }