// #end example

        private void storeInitialObjects(DatabaseSupportWithReadWriteLock dbSupport)
        {
            dbSupport.InWriteTransaction(
                container =>
            {
                container.Store(new Person("Joe"));
                container.Store(new Person("Jan"));
                container.Store(new Person("Joanna"));
                container.Store(new Person("Phil"));
            });
        }
        // #end example

        // #example: Use a write transaction to update objects
        private void UpdateAllJoes(DatabaseSupportWithReadWriteLock dbSupport)
        {
            dbSupport.InWriteTransaction(
                container =>
            {
                var allJoes = from Person p in container
                              where p.Name == "Joe"
                              select p;
                foreach (Person joe in allJoes)
                {
                    joe.Name = "New Joe";
                    container.Store(joe);
                }
            });
        }