Presentation is loading. Please wait.

Presentation is loading. Please wait.

Oct 2 2007 * Brad Tutterow. VS 2008.NET 3.5LINQ Entity Framework  The ADO.NET Entity Framework is part of Microsoft’s next generation of.NET technologies.

Similar presentations


Presentation on theme: "Oct 2 2007 * Brad Tutterow. VS 2008.NET 3.5LINQ Entity Framework  The ADO.NET Entity Framework is part of Microsoft’s next generation of.NET technologies."— Presentation transcript:

1 Oct 2 2007 * Brad Tutterow

2 VS 2008.NET 3.5LINQ Entity Framework  The ADO.NET Entity Framework is part of Microsoft’s next generation of.NET technologies.  It is intended to make it easier and more effective for object- oriented applications to work with data. 11/11/2015Daugherty Business Solutions * Brad Tutterow

3  Originally intended to be part of the Visual Studio 2008 Release  Now scheduled for “later”.  Entity Framework is currently Beta 2  Entity Framework Tools are currently CTP 11/11/2015Daugherty Business Solutions * Brad Tutterow

4 Inherit differences between data expression in a relational database and the same data expressed in an object-oriented application. 11/11/2015 Daugherty Business Solutions * Brad Tutterow

5 Almost any business application today has to speak to a relational database. This involves the usual suspects of tables with foreign keys, a smattering of views, and generally a gob of stored procedures. TablesViewsStored ProceduresForeign Key Relationships 11/11/2015Daugherty Business Solutions * Brad Tutterow

6 ObjectsBehaviorPropertiesInheritanceComplex Types  Applications themselves are written in a completely different world.  The same data that lives in the relational database is represented entirely differently in the application. 11/11/2015Daugherty Business Solutions * Brad Tutterow

7 Logical Data ModelLots of Custom CodeApplication Domain  The result of this “impedance mismatch” is that developers devote a lot of time and energy writing code to translate between how the database likes to see data and how the application likes to see data. 11/11/2015Daugherty Business Solutions * Brad Tutterow

8  Hibernate (Java)  Enterprise Objects Framework (Mac OS)  NHibernate (.NET)  LINQ to SQL (Visual Studio 2008)  And many, many, more … 11/11/2015 Daugherty Business Solutions * Brad Tutterow

9 Logical Data ModelEntity Data ModelLess Custom CodeApplication Domain  The ADO.NET Entity Framework seeks to remedy the problem by providing a layer of abstraction between the logical data model and the application domain. 11/11/2015Daugherty Business Solutions * Brad Tutterow

10 Logical Data Model Tables Rows Foreign Keys Entity Data Model Entity Sets Entities Relationships  Closer to the application problem space  Better suited for object oriented programming  Supports Inheritance  Supports complex types  Relationships are more meaningful to the application 11/11/2015Daugherty Business Solutions * Brad Tutterow

11 The tools and technology that developers will interact with when using the ADO.NET Entity Framework 11/11/2015 Daugherty Business Solutions * Brad Tutterow

12  A gob of XML that defines  Logical Data Tables, Views, Foreign Keys  Entity Objects that Map to the Logical Data  The Mapping Between the Two 11/11/2015Daugherty Business Solutions * Brad Tutterow

13  A Visual Studio Designer that protects developers from the XML that is the EDM 11/11/2015Daugherty Business Solutions * Brad Tutterow

14  A code-generated data context created from the Entity Data Model  Responsible for managing communication between the conceptual data model and the logical data model 11/11/2015Daugherty Business Solutions * Brad Tutterow

15  Code-generated class definitions for objects defined in the EDM. 11/11/2015Daugherty Business Solutions * Brad Tutterow

16 How do we get data out of the fancy Entity Data Model? 11/11/2015 Daugherty Business Solutions * Brad Tutterow

17  A brand new SQL language to learn  Leverages the rich, object- oriented Entity Data Model  Inheritance  Collections  Complex Types  Literal Strings – No Compiler Checking  Questionable value in embedded SQL in code 11/11/2015Daugherty Business Solutions * Brad Tutterow

18  Queries the object model created against the EDM  Still string-based. No compiler checking  An ugly mix of code and eSQL statements 11/11/2015Daugherty Business Solutions * Brad Tutterow

19  Full compiler checking. No wondering if the query is valid.  A fun new SQL-Like syntax  More OO-ish 11/11/2015Daugherty Business Solutions * Brad Tutterow

20 Getting data out of the Entity Data Model using LINQ to Entities 11/11/2015 Daugherty Business Solutions * Brad Tutterow

21 The power of the Entity Data Model contrasted to a logical data model of tables and stored procedures. 11/11/2015 Daugherty Business Solutions * Brad Tutterow

22 Database Tables Entity Data Model 11/11/2015 Daugherty Business Solutions * Brad Tutterow

23 Combining Two Tables into one EDM Entity 11/11/2015 Daugherty Business Solutions * Brad Tutterow

24 Database Tables Entity Data Model 11/11/2015 Daugherty Business Solutions * Brad Tutterow

25 Implementing Inheritance by marking one Entity as a subclass of another 11/11/2015 Daugherty Business Solutions * Brad Tutterow

26  Implement Complex Types (e.g. Address)  Consume Conceptual Model with Reporting Services and other BI Tools  Create an EDM that talks to stored procedures  Use transactions, manage concurrency, cache execution plans 11/11/2015 Daugherty Business Solutions * Brad Tutterow

27 Database Result DesiredEDM Object Manipulation INSERT ROWCreate new object Add object to EDM Context Update Context DELETE ROWGet instance of object from EDM Context Ask Context to remove the object Update Context UPDATE ROWGet instance of object from EDM Context Update object Update Context 11/11/2015 Daugherty Business Solutions * Brad Tutterow

28 11/11/2015 Daugherty Business Solutions * Brad Tutterow


Download ppt "Oct 2 2007 * Brad Tutterow. VS 2008.NET 3.5LINQ Entity Framework  The ADO.NET Entity Framework is part of Microsoft’s next generation of.NET technologies."

Similar presentations


Ads by Google