Пример #1
0
 public List <TreeView> GetTree()
 {
     using (DBEntities entity = new DBEntities())
     {
         return(InitializeTree.InstanceTree(entity, false));
     }
 }
Пример #2
0
        static public List <TreeView> InstanceTree(DBEntities entity, bool update)
        {
            if (_init == null)
            {
                lock (_lockObj)
                {
                    if (_init == null)
                    {
                        _init = new InitializeTree(entity);
                    }
                }
            }
            if (update)
            {
                lock (_lockObj)
                {
                    _init = new InitializeTree(entity);
                }
            }

            return(_tree);
        }