I want to combine records from 2 tables, sort them and read TOP rows from a result set.
T1
Id, Timestamp, Text1
T2
Id, Timestamp, Text2
With SQL, this can be done as follows:
SELECT TOP 10 * FROM
(
SELECT
[Timestamp],
[Text1]
FROM
T1
UNION
SELECT
[Timestamp],
[Text2]
FROM
T2
) as x
ORDER BY [Timestamp]
Q: How can I accomplish this task with EF linq?
source
share