The ability to query relational stores other than the Microsoft SQL Server family of products.

What is LINQ?

Microsoft’s new Language Integrated Query (LINQ) is a set of extensions to the .NET Framework that provide common capabilities within the programming language for querying against in-memory data as well as external data sources.  LINQ complements our vision for an Entity Data Platform by providing language extensions for querying data as objects within the programming language.

Relations between LINQ & Entity Framework?

The ADO.NET Entity Framework will fully support LINQ through a feature known as “LINQ to Entities”. LINQ to Entities combines the developer experience of having query integrated into the programming language and the richness of being able to define an Entity Data Model with flexible mapping to relational stores.

What is the difference?

LINQ to SQL supports rapid development of applications that query Microsoft SQL Server databases using objects that map directly to SQL Server schemas.  LINQ to Entities supports more flexible mapping of objects to Microsoft SQL Server and other relational databases through extended ADO.NET Data Providers.

If you are writing an application that requires any of the following features, you should use the ADO.NET Entity Framework:

  •      The ability to define more flexible mapping to existing relational schema, for example:
    1.  Mapping a single class to multiple tables
    2.  Mapping to different types of inheritance
    3.  Directly Modeling Many to Many relationships
    4.  Mapping to an arbitrary query against the store
  •       The ability to share a model across Replication, Reporting Services, BI, Integration Services, etc.
  •       A full textual query language
  •       The ability to query a conceptual model without materializing results as objects

If you do not require any of these features, LINQ to SQL may provide a simpler solution for rapid development. LINQ to SQL is targeted at rapid-development scenarios against Microsoft SQL Server and provides a simpler approach and richer design experience in the Orcas timeframe for applications with data classes that map directly to the schema of your Microsoft SQL Server database.

Microsoft is defining a migration plan for customers that start with LINQ to SQL and require additional functionality, such as richer mapping capabilities or access to other stores, to migrate to the ADO.NET Entity Framework.

LINQ to SQL supports rapid development of applications that query Microsoft SQL Server databases using objects that map directly to SQL Server schemas. 

LINQ to Entities supports more flexible mapping of objects to Microsoft SQL Server and other relational databases through extended ADO.NET Data Providers

posted on 2011-08-03 06:51  lochker  阅读(796)  评论(0编辑  收藏  举报