0% found this document useful (0 votes)
81 views23 pages

Eric Nelson: Developer & Platform Group Microsoft LTD

LINQ to Entities is the most visible part of the.NET Entity Framework v2 in VS2010 and.NET Framework 4. Entity Framework is probably not the best choice on applications expected to "live" for a long time. LINQ is not about databases, it is about Objects LINQ = Language-Integrated Query Extensions to programming languages to query objects in memory Why use it?

Uploaded by

Xuan Thu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views23 pages

Eric Nelson: Developer & Platform Group Microsoft LTD

LINQ to Entities is the most visible part of the.NET Entity Framework v2 in VS2010 and.NET Framework 4. Entity Framework is probably not the best choice on applications expected to "live" for a long time. LINQ is not about databases, it is about Objects LINQ = Language-Integrated Query Extensions to programming languages to query objects in memory Why use it?

Uploaded by

Xuan Thu
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

Eric Nelson

Developer & Platform Group Microsoft Ltd [email protected] http://geekswithblogs.net/IUpdateable http://twitter.com/ericnel

{ Simple Walkthough }

Many ORMs out there


LLBLGen Pro http://www.llblgen.com/ Nhibernate http://www.hibernate.org/343.html EntitySpaces http://www.entityspaces.net/Portal/Default.aspx Open Access http://www.telerik.com/products/orm.aspx DevForce http://www.ideablade.com/ XPO http://www.devexpress.com/Products/NET/ORM/ Lightspeed http://www.mindscape.co.nz/products/LightSpeed/default.aspx Plus many, many more

No clear winner = relatively little adoption of ORM


Developers waiting on Microsoft Of 31 .NET ORMs in 2003, 9 lasted to 2008

Typed Datasets (cough) shipped ObjectSpaces v1 never shipped ObjectSpaces v2 never shipped Microsoft Business Framework never shipped WinFS never shipped LINQ to SQL - shipped November 2007
Visual Studio 2008 & .NET Framework 3.5

LINQ to Entities - shipped August 2008


Visual Studio 2008 SP1 & .NET Framework 3.5 SP1

Note: LINQ to Entities is the most visible part of the ADO.NET Entity Framework

Entity Framework and LINQ to Entities is our strategic technology


Entity Framework v2 in VS2010 and .NET Framework 4.0
Best of LINQ to SQL moves into LINQ to Entities

Microsoft is using it
Data Services - shipping Reporting Services Sync Services Microsoft M

Partners supporting it
Database Vendors IBM,OpenLink, Data Direct, Devart etc ORM vendors supporting it
DevForce now target Entity Framework, replacing their own LLBLGen v3 will target Entity Framework as well as their own

It is not just about ORM

What is LINQ?
LINQ is not about databases, it is about objects LINQ = Language-Integrated Query
Extensions to programming languages to query objects in memory

Why use it?


Productivity!!! LINQ rocks www.linqpad.net

We ship
LINQ to Objects LINQ to XML LINQ to Datasets LINQ to SQL just SQL Server LINQ to Entities added in .NET Framework 3.5 SP1

Others make LINQ to Flickr etc

LINQ to SQL Database Support SQL Server

LINQ to Entities SQL Server, DB2, Oracle, Sybase, MySQL ... Complex

Object Relational Mapping Capabilities Status Annoying

Simple

Not strategic Rarely

Strategic Often

Entity Framework v1 is being adopted


Typically on applications expected to live a long time

Entity Framework is only .NET 3.5 SP1 and above Entity Framework is probably not the best choice for a short lived SQL Server applications
Entity Framework v1 has warts
Designer It is annoying buggy, clunky Exposes subset of the functionality Does not support model first N-tier story Stored Procedure Support Foreign Keys PoCo Guids SQL 2008 New Types

What is it?
Tools and services to create an Entity Data Model
EDM gives ORM to SQL Server, Oracle, DB2 etc

Tools and services for consuming an Entity Data Model

Why use it?


Productivity Complex mapping between entities and database tables Works great with ADO.NET Data Services

Notes
Strategic but just released...

Application model
Mapped to a persistence store

Entity Data Model Conceptual

Comprised of three layers:


Conceptual (CSDL) Mapping (MSL) Storage (SSDL)

Mapping

Database agnostic Comprised of:


Entities Associations Functions

Storage

{ A look at mapping }

Entity Client
Entity SQL

Object Services
Entity SQL LINQ To Entities

Familiar ADO.NET object model:


EntityCommand EntityConnection EntityDataReader EntityParameter EntityTransaction

Text-based results Read-only Uses Entity SQL

Queries materialized as Objects


ObjectContext ObjectQuery<T>

Built on top of Entity Client Two query options:


Entity SQL LINQ

Runtime services:
Unit of work Identity tracking Eager/explicit loading

Entity SQL

LINQ To Entities

Object Services

Entity Client

ADO.NET Provider

{ Consuming an EDM}

Entity Framework Across MS Products and Technologies more widely adopted Rough edges removed Technologies work better together
Better ORM capabilities in LINQ to Entities POCO support, N-Tier, Model First

e.g. ASP.NET Dynamic Data and Entity Framework

Better tooling

Less xml editing during development

1990 to 2007 Tables 2008 Objects

Data Access technology remained reasonably static Procedural, API access Surfaced the database schema No clear ORM choice

LINQ excellent addition to the .NET languages Entity Framework and the EDM strategic investment Productivity leap

http://geekswithblogs.net/IUpdateable Or http://iupdateable.com

2008 Microsoft Ltd. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

EDM = Entity Data Model EF = ADO.NET Entity Framework

ESQL = Entity SQL LINQ = Language Integrated Query


CSDL = Conceptual Schema Definition Language SSDL = Store Schema Definition Language MSDL = Mapping Schema Definition Language Lambda Syntax = customer.Select(...) Comprehension Syntax = from c in customer ... SQL = Structured Query Language

You might also like