private static void AssertTransientNotStored(WithTransient instance) { if (null != instance.TransientString) { throw new Exception("Transient was stored!"); } }
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(); }