예제 #1
0
		public void SerializableType()
		{
			ISession s = OpenSession();
			Vetoer v = new Vetoer();
			v.Strings = new string[] {"foo", "bar", "baz"};
			s.Save(v);
			object id = s.Save(v);
			v.Strings[1] = "osama";
			s.Flush();
			s.Close();

			s = OpenSession();
			v = (Vetoer) s.Load(typeof(Vetoer), id);
			Assert.AreEqual("osama", v.Strings[1], "serializable type");
			s.Delete(v);
			s.Delete(v);
			s.Flush();
			s.Close();
		}
예제 #2
0
		public void Veto()
		{
			ISession s = OpenSession();
			Vetoer v = new Vetoer();
			s.Save(v);
			object id = s.Save(v);
			s.Flush();
			s.Close();

			s = OpenSession();
			s.Update(v, id);
			s.Update(v, id);
			s.Delete(v);
			s.Delete(v);
			s.Flush();
			s.Close();
		}