public static string ExtractRootName(SqlCollectionExpression expression) { SqlRootNameExtractor extractor = new SqlRootNameExtractor(); extractor.Visit(expression); return(extractor.rootName); }
protected override void Visit(SqlSubqueryCollection collection) { if (collection.Query.FromClause != null) { this.rootName = SqlRootNameExtractor.ExtractRootName(collection.Query.FromClause.Expression); } else { this.rootName = string.Empty; } }