oct 2 2007 * brad tutterow. vs 2008.net 3.5linq entity framework the ado.net entity framework is...
TRANSCRIPT
![Page 1: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/1.jpg)
Oct 2 2007 * Brad Tutterow
![Page 2: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/2.jpg)
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.
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 3: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/3.jpg)
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
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 4: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/4.jpg)
Inherit differences between data expression in a relational database and the same data expressed in an object-oriented application.
04/20/23Daugherty Business Solutions * Brad Tutterow
![Page 5: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/5.jpg)
• 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.
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 6: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/6.jpg)
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.
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 7: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/7.jpg)
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.
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 8: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/8.jpg)
Hibernate (Java) Enterprise Objects Framework
(Mac OS) NHibernate (.NET) LINQ to SQL (Visual Studio 2008) And many, many, more …
04/20/23Daugherty Business Solutions * Brad Tutterow
![Page 9: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/9.jpg)
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.
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 10: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/10.jpg)
Closer to the application problem space
Better suited for object oriented programming
Supports Inheritance Supports complex
types Relationships are more
meaningful to the application
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 11: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/11.jpg)
The tools and technology that developers will interact with when using the ADO.NET Entity Framework
04/20/23Daugherty Business Solutions * Brad Tutterow
![Page 12: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/12.jpg)
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
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 13: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/13.jpg)
A Visual Studio Designer that protects developers from the XML that is the EDM
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 14: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/14.jpg)
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
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 15: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/15.jpg)
Code-generated class definitions for objects defined in the EDM.
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 16: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/16.jpg)
How do we get data out of the fancy Entity Data Model?
04/20/23Daugherty Business Solutions * Brad Tutterow
![Page 17: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/17.jpg)
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
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 18: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/18.jpg)
Queries the object model created against the EDM
Still string-based. No compiler checking
An ugly mix of code and eSQL statements
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 19: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/19.jpg)
Full compiler checking. No wondering if the query is valid.
A fun new SQL-Like syntax
More OO-ish
04/20/23 Daugherty Business Solutions * Brad Tutterow
![Page 20: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/20.jpg)
Getting data out of the Entity Data Model using LINQ to Entities
04/20/23Daugherty Business Solutions * Brad Tutterow
![Page 21: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/21.jpg)
The power of the Entity Data Model contrasted to a logical data model of tables and stored procedures.
04/20/23Daugherty Business Solutions * Brad Tutterow
![Page 22: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/22.jpg)
Database TablesDatabase Tables Entity Data ModelEntity Data Model
04/20/23Daugherty Business Solutions * Brad Tutterow
![Page 23: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/23.jpg)
Combining Two Tables into one EDM Entity
04/20/23Daugherty Business Solutions * Brad Tutterow
![Page 24: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/24.jpg)
Database TablesDatabase Tables Entity Data ModelEntity Data Model
04/20/23Daugherty Business Solutions * Brad Tutterow
![Page 25: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/25.jpg)
Implementing Inheritance by marking one Entity as a subclass of another
04/20/23Daugherty Business Solutions * Brad Tutterow
![Page 26: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/26.jpg)
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
04/20/23Daugherty Business Solutions * Brad Tutterow
![Page 27: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/27.jpg)
Database Result Desired EDM Object Manipulation
INSERT ROW Create new objectAdd object to EDM ContextUpdate Context
DELETE ROW Get instance of object from EDM ContextAsk Context to remove the objectUpdate Context
UPDATE ROW Get instance of object from EDM ContextUpdate objectUpdate Context
04/20/23Daugherty Business Solutions * Brad Tutterow
![Page 28: 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](https://reader035.vdocument.in/reader035/viewer/2022062314/56649f1c5503460f94c330de/html5/thumbnails/28.jpg)
04/20/23Daugherty Business Solutions * Brad Tutterow