You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However if I move the Select call after the Take, I receive pageSize times the first found entry. For example if I have page size 10 and the first album has Id 1, I will receive 10 times the album with Id 1. Here is the query:
It assumes that columns from inner will appear after outer, while generated query has it in reverse order.
SELECT [al.User].[Id], [al.User].[UserName], [t].[Id], [t].[Name]
FROM (
SELECT [al0].*FROM [Albums] AS [al0]
ORDER BY [al0].[CreatedOn] DESC
OFFSET @__p_0 ROWS FETCH NEXT @__p_1 ROWS ONLY
) AS [t]
LEFT JOIN [User] AS [al.User] ON [t].[UserId] = [al.User].[Id]
ORDER BY [t].[UserId]
Steps to reproduce
Using the default ASP.NET Core MVC template in Visual Studio with LocalDB.
I have Album database model:
And ListAlbumViewModel:
The issue
If I have full database with albums, this query runs fine and returns correct results:
However if I move the
Select
call after theTake
, I receivepageSize
times the first found entry. For example if I have page size 10 and the first album has Id 1, I will receive 10 times the album with Id 1. Here is the query:Further technical details
EF Core version: 1.0.0
Operating system: Windows 10
Visual Studio version: 2015 Community
The text was updated successfully, but these errors were encountered: