-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query: Bring back support for UseRowNumberForPaging #16400
Comments
Notes from triage:
|
🤣 microsoft is merciless to microsoft's own product |
if don't suppport the "row_num" for paging ,any other way to solve it besides upgrade database. |
Please add a vote for the first post here if you really need this |
Upgrading database may cost lots of money. Just for paging function? My boss would say NO to me. Then I should have these options.
|
Express can be used commercially, but has some resource constraints |
I think this is what cause the .net community is smaller than other language, even .net is better, the support policy (not just support , in fact it just can not use ) of keep dropping user/devs , make company that use .net less than less those year in China . and for the rownumber paging feature, juse use and with this pattern , EF can add a new feature |
Very user unfriendly to remove this feature if specially promised keep it in ef 3.0. |
i don't think it's related to support of SQL Server 2008. Row number paging is supported in transact sql - now and in the future. New Sql Server releases support it too, but the Net.Core EF 3.0 dropped this support in favor of the newer construct. We don't ask you to support Sql Server 2008, but to allow to use the older paging method. |
If newer construct is available in all SqlServer versions we support and it consistent across different types of database, then what value it provides to write additional code to use older paging method? Do you have any data points how it is significantly more beneficial to use older paging method on let's say SqlServer 2016? |
Yes, it's beneficial, but not on a standalone SqlServer 2016, but if you have, say 10 instances of sql server - 3 Sql Server 2008, 6 Sql Server 2012 and 1 Sql Server 2016, then you would use one common technology to access that data. In terms of query performances it would be the same. |
Lot of projects still using SQL Server 2008. It's nice to have pagination support. |
By the way, if you did not noticed - the issue is closed. Try to find other solutions, and there are many |
In the comment by yyjdelete on 1/11/2020 |
@gate21 |
I still get this error for 3.1.2 When I run the project it gives me this error:
Is there any workaround to this? |
Which LINQ query is impacted by this? Is it only Skip()? I plan to move ahead with EF3.1 on a SQL2008 server (upgrading later), I only have two queries using skip and can be rewritten differently. Anything else I should be looking for? Take() will still works right? (it converts to TOP in SQL) |
Azure Synapse Analytics Server (Azure Data Warehouse) databases also do not support OFFSET, so it would be really nice to bring back RowNumberPaging for that. Unlike SQL2008, ASAS is not deprecated and needs support for this as well. |
Hello guys. I also just came up with this problem in .NET 5, unfortunately still using SQL Server 2008. |
@David-Moreira |
@yyjdelete thank you for the quick answer, I'll take a look when possible and let you know if it worked. |
as with every time I run into an issue like this with .NET its sad to see the .NET dev team's unhalting attitude toward backward compatibility. Its admirable to want to appear to always push for change and the latest tech however in reality I think it usually turns more into "Allowing backward compatibility is hard, so we arent going to do it." while putting out the folks that can't upgrade for very reasonable and not unusual reasons. Sorry Microsoft, this is not how you do open source and this is why the .NET ecosystem shrinks every day. 0/10. |
I am not sure what the fuss is about, all of us have told our clients / consumers of our API's that we can no longer support a feature. EF Core team gave us a workaround "SqlServer2008QueryTranslationPostprocessorFactory", I have been using it with EF 3.x in Production for some time now, and it works fine. Thanks guys for giving us a workaround. |
@yyjdelete I then tried running and I get this:
|
Stuck at the same issue, tried many different Interfaces, cant seem to figure it out. |
In the protected override Expression VisitExtension(Expression node)
{
if (node is ShapedQueryExpression shapedQueryExpression)
{
return shapedQueryExpression.Update(Visit(shapedQueryExpression.QueryExpression), shapedQueryExpression.ShaperExpression);
}
if (node is SelectExpression se)
node = VisitSelect(se);
return base.VisitExtension(node);
} Then it will work as before. |
Hi guys, |
This is really help me a lot it save my day I was struggling and find this is really really awesome! Thank you very much |
That's great! However I don't know if yours or that one does something more. Thanks @Rwing |
@David-Moreira Sorry I didn't see this library before. |
Yea, and a nice friendly MIT license on it! |
The NuGet packages target only EF Core 5.0. In order to use it on EF Core 3.1, use the hack code by @yyjdelete in this thread. |
Are there any workaround for EF Core 6.0? |
I use EF Core 6.0 and the UseRowNumberForPaging nuget package. It comes the following error: An unhandled exception occurred while processing the request. TypeInitializationException: The type initializer for 'Offset2RowNumberConvertVisitor' threw an exception. |
Someone needs to adapt the workaround code to EF Core 6.0. It's not portable between versions as it relies on internal implementation details. That's why you're getting the error. I wish EF Core team had never dropped the legacy support. I think maintaining it in EF Core codebase would be way easier than maintaining third-party workarounds. |
Any news where we stand on this? |
Hi, I wrote before about the error. Now have noticed, that the sw works OK at home office, where is the newest SQL server. But at work the paging is not OK with an old Microsoft SQL server. |
The package of https://www.nuget.org/packages/EntityFrameworkCore.UseRowNumberForPaging/ works with SQL2008R2 |
No description provided.
The text was updated successfully, but these errors were encountered: