Inheritance: IEntity, IAmOwnedBy
Example #1
0
 partial void DeleteOrder(Order instance);
Example #2
0
 partial void InsertOrder(Order instance);
Example #3
0
 partial void UpdateOrder(Order instance);
Example #4
0
		private void detach_Orders(Order entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
Example #5
0
		private void attach_Orders(Order entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}
Example #6
0
		private void detach_Orders1(Order entity)
		{
			this.SendPropertyChanging();
			entity.Contact1 = null;
		}
Example #7
0
		private void attach_Orders1(Order entity)
		{
			this.SendPropertyChanging();
			entity.Contact1 = this;
		}
Example #8
0
		public void EnsureCanViewOrder(Order order)
		{
			if (!IsAdministrator) 
			{
				if (order.Basket.UserId != UserId) 
				{
					throw new ApplicationException("You are attempting to view an order that was not created by you");
				}
			}
		}