internal override SqlExpression VisitClientQuery(SqlClientQuery cq) { Type elementType = (cq.Query.NodeType == SqlNodeType.Multiset) ? TypeSystem.GetElementType(cq.ClrType) : cq.ClrType; ICompiledSubQuery item = provider.CompileSubQuery(cq.Query.Select, elementType, new ReadOnlyCollection <SqlParameter>(cq.Parameters)); cq.Ordinal = subQueries.Count; subQueries.Add(item); return(cq); }