Download presentation
Presentation is loading. Please wait.
Published byAirton Natal Soares Modified over 6 years ago
1
Entity Framework 4 and WCF Data Services 4
Max Weber - Senior Consultant
2
Get started with Entity Framework 4
Presentation Goals Get started with Entity Framework 4 Get started with WCF Data Services 4 Create website iBlog Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
3
Entity Data Model Entity Framework 4 WCF Data Services 4
Presentation Agenda Entity Data Model Entity Framework 4 Open up Visual Studio WCF Data Services 4 Summary / Questions Cake Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
4
What is the Entity Data Model?
The Entity Data Model (EDM) is a set of concepts that describe the structure of data, regardless of its stored form. The EDM borrows from the Entity-Relationship Model described by Peter Chen in 1976, but it also builds on the Entity-Relationship Model and extends its traditional uses. Extensions to E-R Model: Separation of the entities and relationships from their storage medium Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
5
Entity Data Model Key Concepts
Entity Type entity key, inheritance, entity Sets, entity container Association Type foreign key, multiplicity, navigation properties, association set, entity container Property Boolean, Int32, String DateTime, Guid, Binary Complex Types Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
6
Entity Framework Overview
7
Entity Framework Overview
Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
8
Conceptual Model Storage Model Data Providers Entity Framework 4
Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
9
Conceptual Model – Entity Framework 4
Conceptual schema definition language (CSDL) Conceptual model == Domain model .csdl file extension CSDL is Entity Framework’s implementation of the Entity Data Model Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
10
Storage Model – Entity Framework 4
Store schema definition language (SSDL) Storage model == Logical model Storage models are provider-specific .ssdl file extension Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
11
Mapping Concepts to Storage – EF4
Mapping specification language (MSL) Maps between conceptual and storage models .msl file extension Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
12
Providers – Entity Framework 4
EF uses the ADO.NET Data Provider model Providers MS SQL Server Indirect access to other DBs using ODBC, OLEDB VistaDB Devart OpenLink Software Synergy …5+ more ADO.NET Data Providers List Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
13
Entity Data Model Tools
Entity Data Model Wizard ADO.NET Entity Data Model Designer Update Model Wizard Command line tool EDM Generator (EdmGen.exe) Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
14
Class Generation – Entity Framework
T4 Templates used to generate Entity classes from CSDL Entities based on EntitySet Tied to .NET, System.Data Plain Old CLR Objects (POCO) Need POCO extension from Visual Studio Gallery POCO Proxy Extensions from Visual Studio Gallery ADO.NET POCO Entity Generator Tangible T4 Editor Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
15
Code Time! – Entity Framework 4
Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
16
Entity Framework: Recap
Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
17
Formerly .NET Data Services (aka Astoria) Description:
WCF Data Services Formerly .NET Data Services (aka Astoria) Description: WCF Data Services enables creation and consumption of data services for the Web or an intranet by using the Open Data Protocol (OData).
18
Architecture Overview : WCF Data Services
19
RESTful work – WCF Data Services
Exposes data as resources (URI) ?$filter=Freight gt 50 Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
20
Open Data Protocol (OData)
Definition OData enables you to expose your data as resources that are addressable by URIs Enables you to access and change data by using the semantics of representational state transfer (REST) Standard HTTP verbs supported: GET, PUT, POST, DELETE. Reference: WCF Data Services Overview -
21
Output Formats – WCF Data Services
Atom JSON XML Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
22
Freedom of data source – WCF Data Services
Entity Framework Provider Uses Entity Data Models to structure access Reflection Provider Exposes data structures with interface IQueryable Create/Update/Delete with interface IUpdatable Custom Provider Roll your own Link to WCF Data Services Providers Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
23
Custom Business Logic – WCF Data Services
Service Operators Act at a service level Interceptors Act at an entity set level Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
24
Client Libraries – WCF Data Services
WCF Data Services Client Library .NET Framework Silverlight OData SDK Javascript (AJAX) PHP Java Ruby Windows Phone 7 (not yet released) Objective-C (iPhone) (not yet released) Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
25
Code Time! – WCF Data Services
Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
26
WCF Data Services Atom feeds in IE
OOTB IE Experience with WCF DS Atom feeds bad Make this change to see Atom feeds properly: Tools-> Internet Options -> Feeds and Web Slices (Settings) Uncheck “Turn on feed reading view” Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
27
Recap: WCF Data Services
28
Entity Data Model Entity Framework 4 WCF Data Services 4
In Summary Entity Data Model Entity Framework 4 Conceptual Model Storage Model Class generation using T4 Templates WCF Data Services 4 OData v2 RESTful services Multiple Data Providers Multiple Output formats Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
29
Distribution of slide deck
This slide deck will be made available from the following locations: Tallan blogs - blogs.tallan.com CTDOTNET –
30
Resources and Questions? Then Cake
Visual Studio Gallery Visual Studio - Entity Framework 4.0 and WCF Data Services 4.0 in Visual Studio 2010 What's New and Cool in Entity Framework 4.0 – DevelopMentor ADO.NET Entity Framework Entity Framework At-a-Glance WCF Data Services WCF Data Services Overview WCF (ADO.NET) Data Services At-a-Glance Data Development Videos Programming Entity Framework Don't Be Iffy (Julie Lerman)
31
It’s time for cake! Tallan, Inc. Proprietary and Confidential. Copyright 2010. 9/19/2018
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.