private void detach_orders(order entity)
		{
			this.SendPropertyChanging();
			entity.customer = null;
		}
		private void attach_orders(order entity)
		{
			this.SendPropertyChanging();
			entity.customer = this;
		}
 partial void Deleteorder(order instance);
 partial void Updateorder(order instance);
 partial void Insertorder(order instance);
Exemple #6
0
 public order insertOrder(int customerId)
 {
     order o = new order
     {
         date = DateTime.Now,
         customerID = customerId
     };
     db.orders.InsertOnSubmit(o);
     try
     {
         db.SubmitChanges();
         return o;
     }
     catch
     {
         return null;
     }
 }