views:

1513

answers:

5

Linq To SQL or Entity framework both integrate nicely with SQL Server 2005.

The SQL Server 2008 spec sheet promises even better integration - but I can't see it.

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

A: 

it has full support for the new data types. lol. beyond that you got me, other than possibilities of optimised queries (like the merge command, etc).

Darren Kopp
A: 

I am guessing most of it has to do on the server anyways. They probably optimized the query execution as for differences I don't know except for the new types.

Nick Berardi
+1  A: 

There is a problem of paging over a joined set that SQL 2005 mis-interprets.

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

LINQ generates a ROW_Number against the joined set. SQL2005 generates a bad plan from that code. Here's a link to the discussion.

Edit#2: I'd like to clarify that I don't know that SQL2008 solves this problem. I'm just hopeful.

David B
Can you elaborate what you mean by 'bad plan' ?
leppie
+1  A: 

This marketing link claims

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

Which is basically untrue.

Linq To SQL is query comprehension translated into expression trees translated into SQL, optimized by the query optimizer and then run against SQL Server database. "directly" feh.

David B
A: 

Unless LINQ exposes the new MERGE statement, no.

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

gbn