示例#1
0
 public OrderItem CreateItem(Order order, Product product)
 {
     var orderItem = new OrderItem
     {
         Order = order,
         Price = 1,
         Product = product,
         Quantity = 3,
         Store = "Internet"
     };
     //_generator.Context.OrderItems.InsertOnSubmit(orderItem);
     _generator.EntityDeleteActions.Add(context => context.OrderItems.DeleteOnSubmit(orderItem));
     return orderItem;
 }
示例#2
0
		private void detach_OrderItems(OrderItem entity)
		{
			this.SendPropertyChanging();
			entity.Product = null;
		}
示例#3
0
		private void attach_OrderItems(OrderItem entity)
		{
			this.SendPropertyChanging();
			entity.Product = this;
		}
示例#4
0
 partial void DeleteOrderItem(OrderItem instance);
示例#5
0
 partial void UpdateOrderItem(OrderItem instance);
示例#6
0
 partial void InsertOrderItem(OrderItem instance);