当前位置: 动力学知识库 > 问答 > 编程问答 >

LINQ to SQL and SQL 2000 - Extensibility Method Definitions gone

问题描述:

I have just had to use LINQ to SQL on a SQL 2000 database and I have noticed that it does not include all the "Extensibility Method Definitions" actions, why is this?

网友答案:

What exactly is missing? What are you seeing (or not)?

In particular, LINQ-to-SQL's strategy for the database (i.e. how to do paging etc on SQL2000 vs SQL2005 etc) is chosen at runtime based on the connection and the specific server (so it updates automatically when you install SQL Server 2008).

The code generation is based purely on the dbml, which doesn't really care about the server version (it is just xml - take a look).

If you are missing some partial methods, I wonder if you haven't accidentally detached your partial classes from the dbml-generated ones, perhaps by changing the namespace or their names.

网友答案:

According to Scott Guthrie:

LINQ to SQL will support SQL 2000. One feature that requires SQL 2005 is the server-side paging support (where you only do the paging in the database). This uses the SQL 2005 ROW_NUMBER() feature which is only in SQL 2005

分享给朋友:
您可能感兴趣的文章:
随机阅读: