How to convert a SQL WITH query to LINQ

How can I convert the following sql query using linq. I just want to have a Row_Number column and use its values in the linq where clause

With t As
(
    Select Row_Number() over ( Order by Id ) as 'RowId', * From Orders
)
Select * From t Where RowId between 1 and 10

Related posts

Leave a Reply