Esempio n. 1
0
        public Order CreateForWish(Guid wishId)
        {
            Order newOrder = null;
            Wish wish = WishAccess.GetWishByPublishId(wishId);
            try
            {
                newOrder = new Order { Status = "InProgress", WishId = wish.Id, PublicId = Guid.NewGuid().ToString() };
                dataContext.Orders.InsertOnSubmit(newOrder);
                dataContext.SubmitChanges();
            }
            catch { }

            return newOrder;
        }
		private void detach_Orders(Order entity)
		{
			this.SendPropertyChanging();
			entity.Wish = null;
		}
		private void attach_Orders(Order entity)
		{
			this.SendPropertyChanging();
			entity.Wish = this;
		}
 partial void DeleteOrder(Order instance);
 partial void UpdateOrder(Order instance);
 partial void InsertOrder(Order instance);