Ejemplo n.º 1
0
 public void InitChildrenIfNecessary()
 {
     if (childrenWeakReference == null)
     {
         var childrenList = new VelocityDbList <DataBaseFileEntry>();
         childrenList.Persist(Session, this);
         childrenWeakReference = new WeakIOptimizedPersistableReference <VelocityDbList <DataBaseFileEntry> >(childrenList);
         Update();
     }
 }
Ejemplo n.º 2
0
 public void InitChildrenIfNecessary()
 {
   if (childrenWeakReference == null)
   {
     var childrenList = new VelocityDbList<DataBaseFileEntry>();
     childrenList.Persist(Session, this);
     childrenWeakReference = new WeakIOptimizedPersistableReference<VelocityDbList<DataBaseFileEntry>>(childrenList);
     Update();
   }
 }
Ejemplo n.º 3
0
 public Person(Person person = null) // creates a random Person object
 {
   int r = randGen.Next(99999);
   firstName = r.ToString();
   r = randGen.Next(99999999);
   lastName = r.ToString();
   VelocityDbList<Person> personList = new VelocityDbList<Person>();
   if (person != null && person.IsPersistent)
   {
     personList.Persist(person.Session, person);
     personList.Add(person);
     friendsRef = new WeakIOptimizedPersistableReference<VelocityDbList<Person>>(personList);
   }
 }
Ejemplo n.º 4
0
        public Person(Person person = null) // creates a random Person object
        {
            int r = randGen.Next(99999);

            firstName = r.ToString();
            r         = randGen.Next(99999999);
            lastName  = r.ToString();
            VelocityDbList <Person> personList = new VelocityDbList <Person>();

            if (person != null && person.IsPersistent)
            {
                personList.Persist(person.Session, person);
                personList.Add(person);
                friendsRef = new WeakIOptimizedPersistableReference <VelocityDbList <Person> >(personList);
            }
        }