LINQ to SQL 支持哪些版本的 SQL Server?
SQL Server 2000 可以用作 LINQ to SQL 的数据库吗?
Can SQL Server 2000 be used as the database for LINQ to SQL?
LINQ to SQL 是否依赖于特定版本的 Microsoft SQL Server?
Does LINQ to SQL rely on a specific version of Microsoft SQL Server?
推荐答案
是的,LINQ to SQL 可与 SQL Sever 2000 一起使用,但有一个例外:您确实需要 ROW_NUMBER() 函数,该函数仅在 SQL Server 2005/2008 中可用,以支持高效的服务器端分页.没有它,分页功能(正如 Mehrdad 指出的那样)是使用经典的 Top N 策略提供的 - 非常随着您对数据集的分页越来越远而效率低下,因为您最终会从第三页.
Yes, LINQ to SQL works with SQL Sever 2000 with one exception: you do need the ROW_NUMBER() function, available only in SQL Server 2005/2008, to support efficient server-side paging. Without it, paging functions (as Mehrdad points out) are delivered using the classic Top N strategy - very inefficient as you page further and further through your dataset because you end up throwing out most of your selected records from the third page on.
相关文章