1 / 14

ADO.NET Data Services and the ADO.NET Entity Framework

ADO.NET Data Services and the ADO.NET Entity Framework. A tour of new features found in the ADO.NET Entity Framework. Personal Information (a little about me). Nathan Zaugg I have been using .net since 2001 I currently work for SolutionStream as an Applications Architect / Consultant

hiero
Download Presentation

ADO.NET Data Services and the ADO.NET Entity Framework

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ADO.NET Data Services and the ADO.NET Entity Framework A tour of new features found in the ADO.NET Entity Framework.

  2. Personal Information (a little about me) Nathan Zaugg I have been using .net since 2001 I currently work for SolutionStream as an Applications Architect / Consultant I have a BS degree in CS from WSU, and have my MCAD certification I love new technology! Contact Information: nzaugg@gmail.com http://InteractiveASP.NET

  3. Overview of the Entity Framework • Released in Visual Studio 2008 SP1 • Requires .NET Framework 3.5 SP1 (Included in VS 2008 SP1) • Three main components • Entity Client • Object Services • LINQ to Entities

  4. Why use Entity Framework? • Compatible with any ADO.NET Client • Allow for modeling a different conceptual model than the physical model • Allows for Complex Properties and Object Inheritance in the conceptual model • Easy to use in place of ADO.NET • Easy to implement Dynamic Queries while preserving Type Safety

  5. ADO.NET Entity Framework

  6. ADO.NET Entity Vocabulary • SSDL – Server Schema Definition Language • MSL – Mapping Specification Language (C-S Map) • CSDL – Conceptual Schema Definition Language • EDM – Entity Data Model (Object Space) • Entity Client – ADO.NET Style Data Access Provider • Object Services – A set of abstraction on top of the Entity Client that provides a strongly typed access to the data • Entity SQL – A special SQL syntax for making text queries against the EDM

  7. Example 1 :: Building our first EDM & the Entity Client • Create a new Entity • Mapping 1:1 is done automatically from any ADO.NET Client • The Entity Client works just like current ADO.NET objects • Relationships can be given meaningful names • Query Syntax Differences • View the SSDL, MSL, and CSDL • Advanced Types & Inheritance • Add / Remove Entities

  8. Object Services & Entity SQL

  9. Example 2 :: Object Services & Entity SQL • Dynamically Query Object Services using Entity SQL • Lazy Loading vs. Eager Loading • Insert / Update / Delete using Object Services

  10. LINQ to Entities

  11. Example 3 :: LINQ to Entities • Query a EDM using LINQ • Insert, Update, and Delete Objects • Use Type Inference & Eager Loading to get related table data • Lazy Loading with LINQ • Detaching & Reattaching an object

  12. Summary • Use the EDM Designer • Become familiar with the EntityClient and Entity SQL • Used Object Services with Entity SQL to return strongly typed objects • LINQ to Entity

  13. Thanks to our Sponsors

More Related