Не в L2S, но вы можете сделать это с помощью ExecuteStoreQuery :
Вы хотите SQL, например:
SELECT
[Project1].[C1] AS [C1],
[Project1].[DepartmentId] AS [DepartmentId],
[Project1].[Code] AS [Code],
[Project1].[DepartmentName] AS [DepartmentName]
FROM ( SELECT [Project1].[DepartmentId] AS [DepartmentId], [Project1].[Code] AS [Code], [Project1].[DepartmentName] AS [DepartmentName], [Project1].[C1] AS [C1], row_number() OVER (ORDER BY [Project1].[DepartmentName] ASC) AS [row_number]
FROM ( SELECT
[Extent1].[DepartmentId] AS [DepartmentId],
[Extent1].[Code] AS [Code],
[Extent1].[DepartmentName] AS [DepartmentName]
1 AS [C1]
FROM [dbo].[Department] AS [Extent1]
) AS [Project1]
) AS [Project1]
WHERE [Project1].[row_number] % 4 = 0
ORDER BY [Project1].[DepartmentName] ASC
(Или заменить параметр для моего жесткогокодированный 4.)
А затем код как:
var q = Context.ExecuteStoreQuery<Foo>(
sql, params);