public void ReadWrite() 
		{
			ISession s = OpenSession();
			StringClobClass b = new StringClobClass();
			b.StringClob = "foo/bar/baz";
			s.Save(b);
			s.Flush();
			s.Close();

			s = OpenSession();
			b = (StringClobClass)s.Load( typeof(StringClobClass), b.Id );
			Assert.AreEqual( "foo/bar/baz", b.StringClob );
			s.Delete( b );
			s.Flush();
			s.Close();
		}
Exemplo n.º 2
0
        public void ReadWrite()
        {
            ISession        s = OpenSession();
            StringClobClass b = new StringClobClass();

            b.StringClob = "foo/bar/baz";
            s.Save(b);
            s.Flush();
            s.Close();

            s = OpenSession();
            b = (StringClobClass)s.Load(typeof(StringClobClass), b.Id);
            Assert.AreEqual("foo/bar/baz", b.StringClob);
            s.Delete(b);
            s.Flush();
            s.Close();
        }
Exemplo n.º 3
0
        public async Task ReadWriteAsync()
        {
            ISession        s = OpenSession();
            StringClobClass b = new StringClobClass();

            b.StringClob = "foo/bar/baz";
            await(s.SaveAsync(b));
            await(s.FlushAsync());
            s.Close();

            s = OpenSession();
            b = (StringClobClass)await(s.LoadAsync(typeof(StringClobClass), b.Id));
            Assert.AreEqual("foo/bar/baz", b.StringClob);
            await(s.DeleteAsync(b));
            await(s.FlushAsync());
            s.Close();
        }
		public void InsertNullValue (){
			using( ISession s = OpenSession() )
			{
				StringClobClass b = new StringClobClass();
				b.StringClob = null;
				s.Save( b );
				s.Flush();
			}

			using( ISession s = OpenSession() )
			{
				StringClobClass b = (StringClobClass) s.CreateCriteria(
					typeof( StringClobClass ) ).UniqueResult();
				Assert.IsNull( b.StringClob );
				s.Delete( b );
				s.Flush();
			}
		}
Exemplo n.º 5
0
        public void InsertNullValue()
        {
            using (ISession s = OpenSession())
            {
                StringClobClass b = new StringClobClass();
                b.StringClob = null;
                s.Save(b);
                s.Flush();
            }

            using (ISession s = OpenSession())
            {
                StringClobClass b = (StringClobClass)s.CreateCriteria(
                    typeof(StringClobClass)).UniqueResult();
                Assert.IsNull(b.StringClob);
                s.Delete(b);
                s.Flush();
            }
        }
Exemplo n.º 6
0
        public async Task InsertNullValueAsync()
        {
            using (ISession s = OpenSession())
            {
                StringClobClass b = new StringClobClass();
                b.StringClob = null;
                await(s.SaveAsync(b));
                await(s.FlushAsync());
            }

            using (ISession s = OpenSession())
            {
                StringClobClass b = (StringClobClass)await(s.CreateCriteria(
                                                               typeof(StringClobClass)).UniqueResultAsync());
                Assert.IsNull(b.StringClob);
                await(s.DeleteAsync(b));
                await(s.FlushAsync());
            }
        }
		public void LongString()
		{
			string longString = new string('x', 10000);
			using( ISession s = OpenSession() )
			{
				StringClobClass b = new StringClobClass();
				b.StringClob = longString;

				s.Save( b );
				s.Flush();
			}

			using( ISession s = OpenSession() )
			{
				StringClobClass b = (StringClobClass) s.CreateCriteria(
					typeof( StringClobClass ) ).UniqueResult();
				Assert.AreEqual( longString, b.StringClob );
				s.Delete( b );
				s.Flush();
			}
		}
Exemplo n.º 8
0
        public void LongString()
        {
            string longString = new string('x', 10000);

            using (ISession s = OpenSession())
            {
                StringClobClass b = new StringClobClass();
                b.StringClob = longString;

                s.Save(b);
                s.Flush();
            }

            using (ISession s = OpenSession())
            {
                StringClobClass b = (StringClobClass)s.CreateCriteria(
                    typeof(StringClobClass)).UniqueResult();
                Assert.AreEqual(longString, b.StringClob);
                s.Delete(b);
                s.Flush();
            }
        }
Exemplo n.º 9
0
        public async Task LongStringAsync()
        {
            string longString = new string('x', 10000);

            using (ISession s = OpenSession())
            {
                StringClobClass b = new StringClobClass();
                b.StringClob = longString;

                await(s.SaveAsync(b));
                await(s.FlushAsync());
            }

            using (ISession s = OpenSession())
            {
                StringClobClass b = (StringClobClass)await(s.CreateCriteria(
                                                               typeof(StringClobClass)).UniqueResultAsync());
                Assert.AreEqual(longString, b.StringClob);
                await(s.DeleteAsync(b));
                await(s.FlushAsync());
            }
        }