Esempio n. 1
0
 private static void AssertTransientNotStored(WithTransient instance)
 {
     if (null != instance.TransientString)
     {
         throw new Exception("Transient was stored!");
     }
 }
Esempio n. 2
0
        private static void ReadWithTransientMarker()
        {
            IEmbeddedConfiguration configuration = Db4oEmbedded.NewConfiguration();

            configuration.Common.MarkTransient(typeof(TransientMarkerAttribute).FullName);
            IObjectContainer container = Db4oEmbedded.OpenFile(configuration, DatabaseFile);
            WithTransient    instance  = container.Query <WithTransient>()[0];

            AssertTransientNotStored(instance);

            container.Close();
        }
 private static void AssertTransientNotStored(WithTransient instance)
 {
     if (null != instance.TransientString)
     {
         throw new Exception("Transient was stored!");
     }
 }