LINQ to SQL vs LINQ to Entities

October 21, 2007 19:08 by steve

With Microsoft .NET 3.5 on the horizon a lot of hype has been around Microsoft’s new Language Integrated Query (LINQ).  So what is LINQ?  LINQ is a set of extensions to the .NET Framework that provides the facility to query in-memory and external data.  When Visual Studio 2008 ships later this year, LINQ will support query in-memory objects (LINQ), XML (XLINQ), ADO.NET DataSets (LINQ to DataSet) and SQL Server (LINQ to SQL).

Next year, probably Q2 2008, Microsoft will release the ADO.NET Entity Framework.  The Framework will fully support LINQ through LINQ to Entities.  LINQ to SQL and the ADO.NET Entity Framework are both an O/RM (Object Relational Mapper) that enables you to map entities to your data source. 

So when should you use one over the other?  Well, if you’re using anything that isn’t SQL Server for your data store then the ADO.NET Entity Framework is your only option as LINQ to SQL only works with SQL Server.  If you are using SQL Server though, you still have the choice between the two technologies.  In simple terms, the ADO.NET Entity Framework is the big brother of LINQ to SQL and if your application requires one or more of the following then you should choose the ADO.NET Entity Framework:

  • Mapping a single class to multiple tables
  • Mapping to inheritance
  • Mapping directly many-to-many relationships
  • Mapping to a query
  • Querying a database that isn’t SQL Server
  • The ability to share the data model across other services such as Reporting Services, Integration Services etc.

The above lists just a few major differences between the two technologies. 


Scott Guthrie has a great overview of LINQ to SQL on his blog.


Currently rated 2.5 by 2 people

  • Currently 2.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

New Windows Live QuickApp

October 6, 2007 14:45 by steve

In associaion with ShapLogic the Windows Live Platform Group have released another QuickApp.  Based around the sample database of SQL Server 2005, Adventure Works, the website utilises a number of Live services to quickly build a fully functional web application.

What is in it from Windows Live?

  • Live ID being associated with ASP.NET Profiles
  • User Generated Video Content
  • Accepting file uploads
  • dropping the uploads onto a MSMQ Queue
  • automatically encoding using Expression Encoder
  • programmatically uploading to Silverlight Streaming
  • rendering the videos back from Silverlight Streaming
  • Map Point Web Service
  • Contacts Control
  • Spaces Photo Control
  • Windows Live Alerts

The app also makes use of SilverLight.

 You can view the test website or download the source from codeplex.


Currently rated 1.0 by 1 people

  • Currently 1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Mixed Opinions @ MixUK 07

September 30, 2007 20:52 by steve

When the team went to this year’s MixUK 07 we witnessed a number of impressive demos.  The sneak peeks session at the end of the event was probably the most interesting and covered a variety of innovative ideas.  SeaDragon was an incarnation of the Microsoft acquisition of the company of the same name back in February 07.  This technology was shown earlier in the year at TEDMicrosoft is planning to ship SeaDragon next year as part of the Silverlight 1.1 release.

Something that interested Bruce was the talk on Transactional Memory and was presented by Simon Peyton Jones from Microsoft Research in Cambridge.  In a nutshell, Microsoft are trying to address the problems that arise with the performance overhead of managing concurrency in memory in a multi-core environment. 

On the first night Zi organised food and drink after the event.  I sat on the same table as Mike Ormond, Danny Thorpe and a few guys and gals from screenedit.  Thanks for a good night.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5