Esempio n. 1
0
		public void SaveOrUpdateCopy()
		{
			object clubId;

			using (ISession s = OpenSession())
			{
				Club club1 = new Club();
				clubId = s.Save(club1);
				s.Flush();
			}

			Clubmember mem = new Clubmember();

			ISession sess2 = OpenSession();
			mem.Club = (Club) sess2.Get(typeof(Club), clubId);
			sess2.Close();

			ISession sess = OpenSession();
			mem.Expirydate = DateTime.Now.AddYears(1);
			mem.Joindate = DateTime.Now;

			sess.SaveOrUpdateCopy(mem);
			sess.Flush();

			sess.Close();

			using (ISession s = OpenSession())
			{
				s.Delete("from System.Object");
				s.Flush();
			}
		}
Esempio n. 2
0
		public Clubmember()
		{
			m_Id = 0;
			m_Club = new Club();
		}
Esempio n. 3
0
 public Clubmember()
 {
     m_Id   = 0;
     m_Club = new Club();
 }