public List <TreeView> GetTree() { using (DBEntities entity = new DBEntities()) { return(InitializeTree.InstanceTree(entity, false)); } }
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); }