entity framework overview4982

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

Post on 21-Oct-2015

10 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Eric NelsonDeveloper & Platform GroupMicrosoft [email protected] http://geekswithblogs.net/IUpdateable http://twitter.com/ericnel

  • Many ORMs out thereLLBLGen Pro http://www.llblgen.com/Nhibernate http://www.hibernate.org/343.htmlEntitySpaces http://www.entityspaces.net/Portal/Default.aspxOpen 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 moreNo clear winner = relatively little adoption of ORMDevelopers waiting on MicrosoftOf 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.5LINQ 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 technologyEntity Framework v2 in VS2010 and .NET Framework 4.0Best of LINQ to SQL moves into LINQ to EntitiesMicrosoft is using itData Services - shippingReporting ServicesSync ServicesMicrosoft MPartners supporting itDatabase Vendors IBM,OpenLink, Data Direct, Devart etcORM vendors supporting itDevForce now target Entity Framework, replacing their ownLLBLGen v3 will target Entity Framework as well as their ownIt is not just about ORM

  • What is LINQ?LINQ is not about databases, it is about objectsLINQ = Language-Integrated QueryExtensions to programming languages to query objects in memoryWhy use it?Productivity!!! LINQ rockswww.linqpad.net We shipLINQ to Objects LINQ to XMLLINQ to DatasetsLINQ to SQL just SQL Server LINQ to Entities added in .NET Framework 3.5 SP1Others make LINQ to Flickr etc

  • LINQ to SQLLINQ to EntitiesDatabase SupportSQL ServerSQL Server, DB2, Oracle, Sybase, MySQL ...Object Relational Mapping CapabilitiesSimpleComplexStatusNot strategic StrategicAnnoyingRarelyOften

  • Entity Framework v1 is being adoptedTypically on applications expected to live a long timeEntity Framework is only .NET 3.5 SP1 and aboveEntity Framework is probably not the best choice for a short lived SQL Server applicationsEntity Framework v1 has wartsDesigner It is annoying buggy, clunkyExposes subset of the functionalityDoes not support model firstN-tier storyStored Procedure SupportForeign KeysPoCoGuidsSQL 2008 New Types

  • What is it?Tools and services to create an Entity Data ModelEDM gives ORM to SQL Server, Oracle, DB2 etcTools and services for consuming an Entity Data ModelWhy use it?ProductivityComplex mapping between entities and database tablesWorks great with ADO.NET Data ServicesNotesStrategic but just released...

  • Application modelMapped to a persistence storeComprised of three layers:Conceptual (CSDL)Mapping (MSL)Storage (SSDL)Database agnosticComprised of:EntitiesAssociationsFunctionsConceptualMappingStorageEntity Data Model

  • Entity ClientEntity SQLObject ServicesEntity SQLLINQ To Entities

  • Familiar ADO.NET object model:EntityCommandEntityConnectionEntityDataReaderEntityParameterEntityTransactionText-based resultsRead-onlyUses Entity SQL

  • Queries materialized as ObjectsObjectContextObjectQueryBuilt on top of Entity ClientTwo query options:Entity SQLLINQRuntime services:Unit of workIdentity trackingEager/explicit loading

  • LINQ To EntitiesObject ServicesEntity SQLEntity ClientADO.NET Provider

  • http://geekswithblogs.net/IUpdateableOrhttp://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.

  • * 2007 Microsoft Corporation. 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.

    ** 2007 Microsoft Corporation. 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.

    ******** 2007 Microsoft Corporation. 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.

    **** 2007 Microsoft Corporation. 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.

    ****** 2007 Microsoft Corporation. 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.

    *******