Invalid Column Name when using Skip and Take on working query

Billy Jacobs 6 Reputation points
2021-07-28T03:25:50.54+00:00

I have the following ef core 5.0 query. It works as expected until I add the last line which adds a skip and take. With this last line it throws a Microsoft.Data.SqlClient.SqlException: 'Invalid column name ... specifying numerous columns.

118444-image.png

I did a bit more investigating and the issue is related to the lines that do the following:

118457-image.png

If I remove the .Take(1) on those lines then it works. Any help would be greatly appreciated.

Developer technologies .NET Entity Framework Core
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.