FLATTEN (Entity SQL)
Converts a collection of collections into a flattened collection. The new collection contains all the same elements as the old collection, but without a nested structure.
Any valid expression that returns a collection of value collections to flatten into a single collection.
FLATTEN is one of the Entity SQL set operators. All Entity SQL set operators are evaluated from left to right. See EXCEPT (Entity SQL) for precedence information for the Entity SQL set operators.
The following Entity SQL query uses the FLATTEN operator to convert a collection of collections into a flattened collection. To compile and run this query, follow these steps:
Follow the procedure in How to: Execute a Query that Returns StructuralType Results.
Pass the following query as an argument to the ExecuteStructuralTypeQuery method: