2 Behind every great site, there is great data Eric Nelson Developer Evangelist Microsoft UK

Slides:



Advertisements
Similar presentations
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Advertisements

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Identity Management - Login © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
MIX 09 4/15/ :14 PM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
ASP.NET 3.5 Mike Ormond Developer & Platform Group Microsoft Ltd
.NET Framework V3.5+ & RESTful web services Mike Taulty Developer & Platform Group Microsoft Ltd
The Microsoft Technical Roadshow 2007 Advances for Data in VS “Orcas” Mike Taulty Developer & Platform Group Microsoft Ltd
05 | Data Access with Entity Framework Bruno Terkaly | Technical Evangelist Bret Stateham | Technical Evangelist.
Multitenant Model Request/Response General Model.
demo.
Eric Nelson Developer & Platform Group Microsoft Ltd
Announcing Demo Announcing.
Feature: OLE Notes Migration Utility
Feature: Web Client Keyboard Shortcuts © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
SQL Server Developer Tools, Codename “Juneau” Database Services Sanjay Nagamangalam Principal Program Manager SQL Server Manageability.
Session 1.
Built by Developers for Developers…. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
Migrating to Windows Azure SQL Database Name Title Microsoft Corporation.
Feature: Assign an Item to Multiple Sites © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
ADO.NET ENTITY FRAMEWORK Mike Taulty Developer & Platform Group Microsoft UK
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
Feature: Print Remaining Documents © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
NEXT: Overview – Sharing skills & code.
demo Receive Inventory Export Parse and Normalize.
© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or.
ADO.NET Entity Framework Mike Taulty Developer & Platform Group Microsoft Ltd
Feature: Customer Combiner and Modifier © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
SQL Server SQL Azure Visual Studio“Quadrant” SQL Server Modeling Services Entity Framework ADO.NET“M”/EDM Data Services …
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
demo Instance AInstance B Read “7” Write “8”

customer.
1 ADO.NET Data Services Mike Taulty Developer & Platform Group Microsoft Ltd
demo © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names.
demo Demo.
demo QueryForeign KeyInstance /sm:body()/x:Order/x:Delivery/y:TrackingId1Z
Windows Azure SQL Data Sync Name Title Microsoft Corporation.
projekt202 © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are.
The CLR CoreCLRCoreCLR © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product.
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks.
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or.
Language Integrated Query Mike Taulty Developer & Platform Group Microsoft Ltd
public class Foo { Bar _bar; public Foo() { this._bar = new Bar(); } public class Foo { IBar _bar; public Foo(IBar barDependency) {

Data Access Methodologies: When to choose what (ADO.NET, Entity Framework, WCF Data Services) Wriju Ghosh Lead Partner Consultant, Microsoft.
DataModel VisualizationExternal Assets Workbook Excel Services API BrowserRich Apps EWA JSOMBrowser REST BrowserRich Apps.
2 ADO.NET Data Services for the Web Mike Flasko Program Manager, Microsoft “Project Astoria”
Возможности Excel 2010, о которых следует знать
ADO.NEXT Advances in Data Access for 2008
Title of Presentation 11/22/2018 3:34 PM
Accessing Data in a .NET Web Application
SPC2012 – IT-Pro 11/30/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Title of Presentation 12/2/2018 3:48 PM
Tech Ed North America /1/ :36 AM Required Slide
Jim Nakashima Program Manager Cloud Tools
Pablo Castro Software Architect Microsoft Corporation
MSDN Roadshow Rerun Welcome.
Create rich, data-driven Web apps with ASP.NET 4.5 Web Forms
8/04/2019 9:13 PM © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Виктор Хаджийски Катедра “Металургия на желязото и металолеене”
PENSACOLA ENERGY WORK PLAN OCTOBER 10, 2016
Title of Presentation 5/12/ :53 PM
Шитманов Дархан Қаражанұлы Тарих пәнінің
Title of Presentation 5/24/2019 1:26 PM
Title of Presentation 7/24/2019 8:53 PM
Presentation transcript:

2 Behind every great site, there is great data Eric Nelson Developer Evangelist Microsoft UK

3 Agenda Data Access Overview Data access over the years ORM anyone? LINQ and LINQ to SQL ADO.NET Entity Framework Drill into Entity Framework LINQ to Entities LINQ to SQL vs LINQ to Entities Using Entity Framework with ASP.NET Traditional ASP.NET ASP.NET Dynamic Data

4 Data Access over the years Accessing data in 1990 ODBC, embedded SQL Accessing data in 2000 ADO, Stored Procedures Accessing data in 2005 ADO.NET, Datasets, DataReaders Accessing data in 2010 ORM baby!

5 Sidebar: Object Relational Mapping What is it? – technique for working with relational tables as if they were objects in memory – Intention is to hide away the complexity of the underlying tables and give a uniform way of working with data Why use it? – Productivity – Retain database independence Notes – There are many ORMs for.NET developers already in existence. E.g. – LLBLGen Pro – Nhibernate – EntitySpaces

6 How did we get here? ObjectSpaces “v1” – never shipped ObjectSpaces “v2” – never shipped Microsoft Business Framework – never shipped WinFS – never shipped LINQ to SQL - shipped November 2007 LINQ to Entities - shipped August 2008

7 A bit like buses Not one but two ORMs LINQ to SQL LINQ to Entities

8 LINQ and LINQ to SQL What is it? – LINQ is not about databases, it is about objects – LINQ = Language-Integrated Query – Extensions to programming languages to query objects in memory – LINQ to SQL is not about databases, it is about SQL Server Why use it? – Productivity!!! Notes – We ship in.NET Framework 3.5 – LINQ to Objects – LINQ to XML – LINQ to Datasets – LINQ to SQL – LINQ to Entities – added in.NET Framework 3.5 SP1 – Others make LINQ to Flickr etc –

9 Some simple LINQ

10 ADO.NET Entity Framework What is it? – Provides tools and services to create an Entity Data Model – Maps entities to database tables – Provides tools and services for working with an Entity Data Model – Includes ORM capabilities Why use it? – Productivity – Work with SQL Server, Oracle, DB2 etc – When require complex mapping between entities and database tables – Strategic – Works great with ADO.NET Data Services Notes – Just released!

11 Drill into ADO.NET Entity Framework Mapping conceptual to physical Demo Entity Data Model Traditional querying Entity Client Object based access Demo Object Services

Sidebar: LINQ to SQL vs LINQ to Entities 1/2 It depends... LINQ to SQLLINQ to Entities Database SupportSQL ServerMany Object Relational Mapping Capabilities SimpleComplex Requires Attributed.NET Code NoYes StatusReleasedJust Released

Sidebar: Similar – but not quite 2/2 LINQ to SQL – var products = from prod in db.Product – where prod.Color == "Blue" – select prod; LINQ to Entities – var products = from prod in db.Product – where prod.Color == "Blue" – select prod; In general – LINQ to Entities does more – but not always! Only migration that will ever happen is LINQ to SQL migration to LINQ to Entities

14 Entity Data Model Application model – Mapped to a persistence store Comprised of three layers: – Conceptual (CSDL) – Mapping (MSL) – Storage (SSDL) Database agnostic Comprised of: – Entities – Associations – Functions Conceptual Mapping Storage Entity Data Model

15 Creating the Entity Data Model

16 Entity Framework EDM consumption options: – Entity Client – Entity SQL – Object Services – Entity SQL – LINQ To Entities

17 Entity Client Familiar ADO.NET object model: – EntityCommand – EntityConnection – EntityDataReader – Entity Parameter – EntityTransaction Text-based results Read-only Uses Entity SQL

18 Object Services Queries materialized as Objects – ObjectContext – ObjectQuery Built on top of Entity Client Two query options: – Entity SQL – LINQ Runtime services: – Unit of work – Identity tracking – Eager/explicit loading

19 Entity Framework – Service Stack LINQ To Entities Object Services Entity SQL Entity Client ADO.NET Provider

20 Using LINQ to Entities

21 Using Entity Framework with ASP.NET New Entity Data Source Traditional ASP.NET Rich web site scaffolding Works with LINQ to SQL and LINQ to Entities ASP.NET Dynamic Data

22 ASP.NET and Entity Framework

23 The future? Across MS Products and Technologies E.g. Reporting Services? Entity Framework more widely adopted Better ORM capabilities in LINQ to Entities POCO support Rough edges removed Developed “in isolation” e.g. ASP.NET Dynamic Data and Entity Framework Technologies work better together Less xml editing during development Better tooling

24 Conclusion Data Access technology remained reasonably static Procedural, API access Surfaced the database schema 1990 to Tables LINQ – excellent addition to the.NET languages Entity Framework and the EDM – strategic investment Productivity leap Objects Plenty more to come 2009

25 Resources blogs.msdn.com/ericnel blogs.msdn.com/ericnel - all the links General – ADO.NET Team Blog – Mike in our team ( search Entity or LINQ ) – Data Platform Developer Centre gb/data/default.aspxhttp://msdn.microsoft.com/en- gb/data/default.aspx LINQ – LINQPad ADO.NET Entity Framework – EF Lead PM – FAQ – Entity Framework Design ADO.NET Data Services – Team blog

26 Acronyms EDM = Entity Data ModelEF = ADO.NET Entity FrameworkESQL = Entity SQLLINQ = Language Integrated QueryCSDL = Conceptual Schema Definition LanguageSSDL = Store Schema Definition LanguageMSDL = Mapping Schema Definition LanguageLambda Syntax = customer.Select(...)Comprehension Syntax = from c in customer...SQL = Structured Query Language

27 Resources Tech·TalksTech·Ed Bloggers Live SimulcastsVirtual Labs Developer’s Kit, Licenses, and MORE! Professional Design tools for tomorrow

28 © 2008 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.