Integration with SQL Server 2008 and 2005 Linq

The Linq To SQL or Entity interfaces integrate seamlessly with SQL Server 2005.

The SQL Server 2008 promises specification is even better integrated, but I do not see it.

What are some examples of what you can do Linq-wise when talking to a 2008 server that you cannot when talking to SQL Server 2005?

+4
source share
5 answers

There is the issue of paging over a federated set that is interpreted by SQL 2005.

var orders = ( from c in Customers from o in c.Orders select new {c, o} ).Skip(10).Take(10).ToList(); 

LINQ generates ROW_Number against the combined set. SQL2005 creates a bad plan from this code. Here is a link to the discussion .

Edit # 2: I would like to clarify that I do not know that SQL2008 solves this problem. I just hope so.

+1
source

This marketing link claims

"Write a data access code directly to a Microsoft SQL Server database using LINQ to SQL."

This is mostly incorrect.

Linq To SQL is an understanding of queries translated into expression trees translated into SQL, optimized by the query optimizer, and then executed with the SQL Server database. "straight" feh.

+1
source

It fully supports new data types. lol. besides what you got me, besides the possibilities of optimized queries (for example, merge commands, etc.).

0
source

I assume that most of them should do on the server anyway. They probably optimized the execution of the request, since for the differences I do not know, except for new types.

0
source

If LINQ does not provide a new MERGE statement, no.

There is little effective difference in engines, especially from the ORM / client view

0
source

Source: https://habr.com/ru/post/1276368/


All Articles