Ejemplo n.º 1
0
		protected override void OnSetUp()
		{
			base.OnSetUp();
			using (ISession session = OpenSession())
			{
				var payment = new Payment { Amount = 5m, Id = 1 };
				var paymentBatch = new PaymentBatch { Id = 3 };
				paymentBatch.AddPayment(payment);
				session.Save(paymentBatch);
				session.Save(payment);
				session.Flush();
			}
		}
Ejemplo n.º 2
0
		public virtual void AddPayment(Payment p)
		{
			payments.Add(p);
			p.PaymentBatch = this;
		}