1 / 36

virtual techdays

INDIA │ 18-20 august 2010. virtual techdays. Entity Framework and enhancements in EF4. Vinayaka Krishna Shenoy │ Technical Architect, MindTree Ltd. INDIA │ 18-20 august 2010. virtual techdays. Introducing Entity Framework Exploring the Entity Data model Querying Entity Data Model

olin
Download Presentation

virtual techdays

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. INDIA │ 18-20 august2010 virtual techdays Entity Framework and enhancements in EF4 Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd

  2. INDIA │ 18-20 august2010 virtual techdays • Introducing Entity Framework • Exploring the Entity Data model • Querying Entity Data Model • Exploring EDM queries in depth • Modifying Entities and Save Changes • Entity Framework 4 features S E S S I O N A G E N D A

  3. INDIA │ 18-20 august2010 virtual techdays Introducing Entity Framework Application development thoughts with Entity framework and its predecessor

  4. INDIA │ 18-20 august2010 virtual techdays DEMO: Entity Framework & Its predecessor Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd

  5. INDIA │ 18-20 august2010 virtual techdays Database Schema

  6. INDIA │ 18-20 august2010 virtual techdays Before Entity Framework

  7. INDIA │ 18-20 august2010 virtual techdays After Entity Framework

  8. INDIA │ 18-20 august2010 virtual techdays Entity Framework features • Programming against the Model, Not against the database • Entity Data Model(EDM) – Bridge between application and the data store • Entity Data Model design tools • Change Tracking • When and Object is instantiated • Result of data returned from a query • Relationship management • Entity Client • Managing Objects with Object Services

  9. INDIA │ 18-20 august2010 virtual techdays Managing Object with Object Services Object Services API Entity Client EDM Metadata Data Provider Data Store

  10. INDIA │ 18-20 august2010 virtual techdays Exploring the Entity Data Model • Why use an Entity Data Model • Your First EDM • The three parts of the Model

  11. INDIA │ 18-20 august2010 virtual techdays Why use an Entity Data Model ? • In data world, databases are designed for • Maintainability • Security • Efficiency • Scalability • Provides lot of challenges for developer

  12. INDIA │ 18-20 august2010 virtual techdays EDM within the Entity Framework • Automatically generates the classes from the model • Takes care of all the database connectivity • Provides a common query syntax for querying the model, not the database • Translates these queries that the database can understand • Provides mechanism for tracking changes to the model’s objects

  13. INDIA │ 18-20 august2010 virtual techdays DEMO: Your First EDM Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd

  14. INDIA │ 18-20 august2010 virtual techdays The three parts of the Model Entity Framework Metadata Conceptual Model (*.csdl) Map(*.msl) Storage Model(*.ssdl) Data Store

  15. INDIA │ 18-20 august2010 virtual techdays Querying Entity Data Model • Your first EDM Query • Where did the context and classes come from? • LINQ to Entity queries • Entity SQL queries • Method based syntax queries for LINQ and Entity SQL • LINQ method based queries • Objects queries query builder method • Entity Client : Lowest level method for returning streamed data

  16. INDIA │ 18-20 august2010 virtual techdays LINQ To Entities Query builder methods Entity SQL Entity SQL queries only LINQ expression tree Entity SQL Entity SQL Parser Object Service’s System.Data.Objects.ObjectQuery Command Tree(Tables/Columns) Command Tree(Entities/Properties) Convert to store schema Data provider Data store Provider specific SQL

  17. INDIA │ 18-20 august2010 virtual techdays DEMO: Querying Entity Data Model Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd

  18. INDIA │ 18-20 august2010 virtual techdays DEMO: Exploring EDM queries in depth Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd

  19. INDIA │ 18-20 august2010 virtual techdays Modifying Entities and Save Changes • Adding new entities • Modifying existing entities • Deleting entities • SaveChanges method • How Object context manages entities

  20. INDIA │ 18-20 august2010 virtual techdays DEMO: Modifying entities and Save Changes Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd

  21. INDIA │ 18-20 august2010 virtual techdays Entity Framework 4 features • Enhanced support for stored procedure • Support for foreign keys • Singularization and Pluralization • Support for lazy loading • Complex types • Support for POCO, Self Tracking entities & N – Tier

  22. INDIA │ 18-20 august2010 virtual techdays DEMO: Enhanced support for stored procedure Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd

  23. INDIA │ 18-20 august2010 virtual techdays DEMO: Support for foreign keys Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd

  24. INDIA │ 18-20 august2010 virtual techdays

  25. INDIA │ 18-20 august2010 virtual techdays OR

  26. INDIA │ 18-20 august2010 virtual techdays

  27. INDIA │ 18-20 august2010 virtual techdays DEMO: Support for Singularization and Pluralization Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd

  28. INDIA │ 18-20 august2010 virtual techdays

  29. INDIA │ 18-20 august2010 virtual techdays

  30. INDIA │ 18-20 august2010 virtual techdays

  31. INDIA │ 18-20 august2010 virtual techdays DEMO: Support for Lazy loading Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd

  32. INDIA │ 18-20 august2010 virtual techdays

  33. INDIA │ 18-20 august2010 virtual techdays DEMO: Complex Type Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd

  34. INDIA │ 18-20 august2010 virtual techdays DEMO: Support for POCO Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd

  35. INDIA │ 18-20 august2010 virtual techdays • MSDN • http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx • http://msdn.microsoft.com/en-us/data/aa937723.aspx • http://msdn.microsoft.com/en-us/library/bb399572.aspx RESOURCES

  36. THANKS│18-20 august2010 virtual techdays vinayakshenoy2000@gmail.com

More Related