collection.GetMulti(filter, 0, sorter, relations, path, 1, 10);
Сгенерированный SQL:
SELECT
...
FROM
((((
[NewsDB].[dbo].[Article]
INNER JOIN [NewsDB].[dbo].[OnlineArticle] ON [NewsDB].[dbo].[Article].[ArticleID] = [NewsDB].[dbo].[OnlineArticle].[OnlineArticleID]
)
INNER JOIN [NewsDB].[dbo].[CategoryOnlineArticle] ON [NewsDB].[dbo].[OnlineArticle].[OnlineArticleID] = [NewsDB].[dbo].[CategoryOnlineArticle].[OnlineArticleID]
)
INNER JOIN [NewsDB].[dbo].[Category] ON [NewsDB].[dbo].[Category].[CategoryID] = [NewsDB].[dbo].[CategoryOnlineArticle].[CategoryID]
)
LEFT JOIN [NewsDB].[dbo].[OldOnlineArticle] ON [NewsDB].[dbo].[OnlineArticle].[OnlineArticleID] = [NewsDB].[dbo].[OldOnlineArticle].[OnlineArticleID]
)
WHERE
(
(
(
[NewsDB].[dbo].[Article].[IsDeleted] = @p1
AND [NewsDB].[dbo].[Article].[IsArchive] = @p2
AND [NewsDB].[dbo].[Article].[NavigateType] = @p3
AND [NewsDB].[dbo].[Article].[Status] = @p4
AND [NewsDB].[dbo].[OnlineArticle].[IsOnlinePublished] = @p5
AND [NewsDB].[dbo].[OnlineArticle].[OnlinePublishDateUtc] <= @p6
)
AND [NewsDB].[dbo].[OnlineArticle].[SiteNewsPortalID] = @p7
AND [NewsDB].[dbo].[Category].[IsDeleted] = @p8
AND [NewsDB].[dbo].[Category].[IsEnable] = @p9
AND [NewsDB].[dbo].[Category].[CategoryType] = @p10
AND [NewsDB].[dbo].[Category].[CategoryID] = @p11
)
AND ( [NewsDB].[dbo].[OnlineArticle].[OnlineArticleID] IS NOT NULL ))
ORDER BY
[NewsDB].[dbo].[OnlineArticle].[RefreshDateUtc] DESC,
[NewsDB].[dbo].[OnlineArticle].[OnlinePublishDateUtc] DESC
Я не вижу OFFSET xxx FETCH xxx в сгенерированном SQL.
Я также установил совместимый уровень на SqlServerCompatibilityLevel.SqlServer2005
.
Как сделать OFFSET xxx FETCH доступным в сгенерированном SQL? Пожалуйста, помогите.