Introducing Entity Framework 4.0

23,598 views

Published on

This is an introduction session about Microsoft Entity Framework 4.0 (year 2011), since then the technology has evolved and matured in many ways and some of the limitations had been mitigated.

Published in: Technology, Spiritual
2 Comments
12 Likes
Statistics
Notes
No Downloads
Views
Total views
23,598
On SlideShare
0
From Embeds
0
Number of Embeds
397
Actions
Shares
0
Downloads
951
Comments
2
Likes
12
Embeds 0
No embeds

No notes for slide
  • References:ADO.NET 2.0 Feature Matrix: http://msdn.microsoft.com/en-us/library/ms379542(VS.80).aspxWikipedia (history of .NET): http://en.wikipedia.org/wiki/.NET_FrameworkMSDN ADO.NET 1.1/2.0: http://msdn.microsoft.com/en-us/data/aa937722.aspxBrief the evolution of ADO.net as a data access technology for the .NET platform.ADO.net is the first Object Oriented data access technology introduced by MicrosoftFirst disconnected modelUses structured XML for caching and storage of dataIntegrates with other .NET technologies like web services and remotingNew in .NET Framework 2.0Generics, Anonymous methods, Lambda expressions, partial classesDeclarative data binding
  • What’s new in .NET framework (features and components evolution): http://msdn.microsoft.com/en-us/library/ms171868.aspx
  • What’s new in .NET framework (features and components evolution): http://msdn.microsoft.com/en-us/library/ms171868.aspx
  • Introducing Entity Framework 4.0

    1. 1. Introducing Entity Framework<br />EF v1.0<br />
    2. 2. History of ADO.Net<br />Object Relational Mapping {ORM}<br />What is Entity Framework?<br />Entity Framework Architecture<br />Entity Data Model {EDM}<br />Entity Client & Object Services<br />LINQ to Entities & Entity SQL {eSQL}<br />Agenda<br />
    3. 3. Load Related Objects<br />Inheritance in Entity Framework<br />Entity Framework providers and multiple database support<br />Entity Framework Limitations<br />External Tools<br />References<br />Agenda (Cont.)<br />
    4. 4. History of ADO .Net<br />
    5. 5.
    6. 6.
    7. 7.
    8. 8. Object Relational Mapping<br />{ORM}<br />
    9. 9. ORM Basics & Concepts<br />
    10. 10. What is Entity Framework?<br />Why it is considered an ORM?<br />
    11. 11. What is Entity Framework?<br />An ORM framework, Why?<br />Database Independent<br />Extensible<br />Part of Microsoft .Net framework 3.5 SP1<br />
    12. 12. Getting Started<br />
    13. 13. Entity Framework Architecture<br />
    14. 14. Entity Framework Architecture<br />
    15. 15. Entity Data Model (EDM)<br />What is Entity Data Mode?<br />
    16. 16. Entity Data Model (EDM)<br />
    17. 17. EDM in Action<br />
    18. 18. Entity Client & Object Services<br />
    19. 19. Entity Client<br />EntityClient Provider for Entity Framework System.Data.EntityClient<br />Abstracts DBMS Providers for Entity Framework Architecture<br />
    20. 20. Entity Client in Action<br />
    21. 21. Object Services<br />
    22. 22. Object Services in Action<br />
    23. 23. Break (30 minutes)<br />
    24. 24. LINQ to Entities & Entity SQL<br />
    25. 25. LINQ to Entities<br />What is LINQ<br />LINQ to Objects<br />LINQ to XML<br />LINQ to DataSets<br />LINQ to SQL<br />And more E.g. (LINQ to Twitter, LINQ to Flickr etc…)<br />LINQ to Entities<br />
    26. 26. LINQ to Entities in Action<br />
    27. 27. Entity SQL (eSQL)<br />Supported<br />NOT Supported<br />SQL based<br />Provider neutral<br />Supports EDM types<br />First class collections<br />Canonical functions<br />DML statements (insert, update, delete)<br />DDL statement (create, alter, drop)<br />Grouping functions (CUBE, ROLLUP, GROUPING_SET<br />Does not support the * construct<br />
    28. 28. Entity SQL in Action<br />
    29. 29. Entity SQL Vs LINQ to Entities<br />Dynamic queries (LINQ is compiled)<br />Store Function/Procedures is only supported in eSQL<br />
    30. 30. Load Related Objects<br />
    31. 31. Entity relation mapping (one to one, one to many, many to many)<br />Deferred Loading Vs Eager Loading Vs Explicit Loading<br />ObjectQuery&lt;T&gt; Class<br />EntityCollection&lt;T&gt; Class<br />EntityReference Class<br />Load Related Objects<br />
    32. 32. Load Related Objects in Action<br />
    33. 33. Inheritance in Entity Framework<br />
    34. 34. Inheritance in Entity Framework<br />Table-per-Hierarchy (TPH)<br />Table-per-Type (TPT)<br />
    35. 35. One table in storage to maintain data for all the types in an inheritance hierarchy.<br />Table-per-Hierarchy (TPH)<br />
    36. 36. <ul><li>Separate table in storage to maintain data for each type in the inheritance hierarchy.</li></ul>Table-per-Type (TPT)<br />
    37. 37. Inheritance in Action<br />
    38. 38. Entity Framework Providers<br />Multiple database support<br />
    39. 39. Entity Framework Providers<br />MySQL Connector et (MySQL)<br />Devart (Oracle, MySQL, SQLite and PostgreSQL)<br />IBM (DB2, Informix and U2 databases)<br />Phoenix Software Solutions (SQLite)<br />Npgsql (PostgreSQL)<br />Sybase SQL Anywhere (SQL Anywhere 11)<br />Firebird (Firebird)<br />VistaDB (VistaDB 4.x)<br />Multiple Database Support in Entity Framework<br />
    40. 40. Multiple Database Support<br />
    41. 41. Entity Framework Limitations<br />
    42. 42. Known Issues and Considerations in LINQ to Entities<br />Ordering Information Lost<br />Nested Queries. Nested Queries May Fail with SQL Server 2000<br />Unsigned Integers Not Supported<br />Enums not supported<br />Referencing Non-Scalar Closures Not Supported<br />Custom extension methods Not Supported<br />Some common sense methods not supported (Single, SingleOrDefault)<br />Entity Framework Limitations<br />
    43. 43. Entity Framework VS.Net Designer Limitations <br />limitations in Entity SQL<br />DDL not supported<br />DML not supported (insert, update, delete)<br />Design issues<br />No Persistence Ignorance support a.k.a POCO<br />Leakage of Testability<br />I am sure there might be more <br />Entity Framework Limitations (Cont.)<br />
    44. 44. LINQPad<br />eSQLBlast<br />http://code.msdn.microsoft.com/esql/<br />External Tools<br />
    45. 45. References<br />
    46. 46. MSDN<br />Programming Guide (Entity Framework)<br />Load Related Objects (Entity Framework)<br />Inheritance in Entity Framework<br />TPH<br />TPT<br />Known Issues and Considerations in LINQ to Entities<br />Entity Framework and LINQ to Entities Forums<br />ADO.NET Entity Framework and LINQ to Entities (Pre-Release) Forums<br />References<br />
    47. 47. Community<br />Zeeshan Hirani Entity Framework Learning Guide<br />Post<br />PDF<br />Gil Fink on Entity Framework<br />Moses’ blog on Entity Framework<br />Entity Framework Supported Mapping Scenarios White Paper by Asad Khan<br />References (Cont.)<br />

    ×