public void InitChildrenIfNecessary() { if (childrenWeakReference == null) { var childrenList = new VelocityDbList <DataBaseFileEntry>(); childrenList.Persist(Session, this); childrenWeakReference = new WeakIOptimizedPersistableReference <VelocityDbList <DataBaseFileEntry> >(childrenList); Update(); } }
public void InitChildrenIfNecessary() { if (childrenWeakReference == null) { var childrenList = new VelocityDbList<DataBaseFileEntry>(); childrenList.Persist(Session, this); childrenWeakReference = new WeakIOptimizedPersistableReference<VelocityDbList<DataBaseFileEntry>>(childrenList); Update(); } }
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); } }
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); } }