360 likes | 508 Views
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
E N D
INDIA │ 18-20 august2010 virtual techdays Entity Framework and enhancements in EF4 Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd
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
INDIA │ 18-20 august2010 virtual techdays Introducing Entity Framework Application development thoughts with Entity framework and its predecessor
INDIA │ 18-20 august2010 virtual techdays DEMO: Entity Framework & Its predecessor Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd
INDIA │ 18-20 august2010 virtual techdays Database Schema
INDIA │ 18-20 august2010 virtual techdays Before Entity Framework
INDIA │ 18-20 august2010 virtual techdays After Entity Framework
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
INDIA │ 18-20 august2010 virtual techdays Managing Object with Object Services Object Services API Entity Client EDM Metadata Data Provider Data Store
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
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
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
INDIA │ 18-20 august2010 virtual techdays DEMO: Your First EDM Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd
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
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
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
INDIA │ 18-20 august2010 virtual techdays DEMO: Querying Entity Data Model Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd
INDIA │ 18-20 august2010 virtual techdays DEMO: Exploring EDM queries in depth Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd
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
INDIA │ 18-20 august2010 virtual techdays DEMO: Modifying entities and Save Changes Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd
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
INDIA │ 18-20 august2010 virtual techdays DEMO: Enhanced support for stored procedure Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd
INDIA │ 18-20 august2010 virtual techdays DEMO: Support for foreign keys Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd
INDIA │ 18-20 august2010 virtual techdays
INDIA │ 18-20 august2010 virtual techdays OR
INDIA │ 18-20 august2010 virtual techdays
INDIA │ 18-20 august2010 virtual techdays DEMO: Support for Singularization and Pluralization Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd
INDIA │ 18-20 august2010 virtual techdays
INDIA │ 18-20 august2010 virtual techdays
INDIA │ 18-20 august2010 virtual techdays
INDIA │ 18-20 august2010 virtual techdays DEMO: Support for Lazy loading Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd
INDIA │ 18-20 august2010 virtual techdays
INDIA │ 18-20 august2010 virtual techdays DEMO: Complex Type Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd
INDIA │ 18-20 august2010 virtual techdays DEMO: Support for POCO Vinayaka Krishna Shenoy│ Technical Architect, MindTree Ltd
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
THANKS│18-20 august2010 virtual techdays vinayakshenoy2000@gmail.com