SlideShare une entreprise Scribd logo
1  sur  37
Building nTier Applications with Entity Framework Services
dotNetDave Conference DVD! Packed full of: Videos of all sessions from 2010 & 2011(1)! Slide decks from 2011 & 2010! Demo projects from 2011 & 2010! David McCarter’s .NET interview Questions! Extras Conference Photos from 2010! Surprise videos! Book + DVD $25! Only $15!
Check Out Your Local User Groups! San Diego Cloud Computing User Group www.azureusergroup.com/group/sandiegoazureusergroup San Diego .NET Developers Group www.sddotnetdg.org San Diego .NET User Group www.sandiegodotnet.com San Diego SQL Server User Group www.sdsqlug.org
Agenda
Overview
Where’s Your Data Model? Applications Today… Implicitly Contain the Data Model Logic and Model Intertwined Conceptual Mismatch Often encapsulate in a "Data Access Layer"
Where’s Your Data Model? ,[object Object]
Applications work with a well Defined Model
Storage Schema Abstraction
Declarative mapping between application and storage models
No brittle, hard-coded mapping,[object Object]
Object Relational Mapping
The Dilemma Software Architects & Developers Database Designers & Administrators
 Object Relational Mapping What is ORM? Technique for working with relational tables as if they were objects in memory Intention is to hide away the complexity of the underlying tables and give a uniform way of working with data
 Object Relational Mapping Why use ORM? Productivity Retain database independence Database portability Objects ► Classes ► Entities
Many attempts Typed Datasets Objectspaces ‘v1’ Objectspaces ‘v2’ Microsoft Business Framework WinFS Linq to SQL NHibernate  Will “RIP”  Not Microsoft’s
Entity Framework
The Microsoft Entity Data Model An extended relational model with Entity-Relationship Model  concepts Entity Types Strong type with Identity Inheritance Scalar/Complex properties EntitySets Hold instances of Entity Types Similar to relational tables Can have multiple Entitysets of the same EntityTypes Relationships ("Associations") Named relationships between Entities 0..1:*, 0..1:0..1, 1:1, 1:M, M:N Navigation may be exposed as NavigationProperties on EntityTypes AssociationSets Contains instances of associations May be queried directly EntityContainers Contains EntitySets, AssociationSets SalesPerson EmployeeID = 294272LoginID = adamTitle = "Dev Lead"VacationHours = 0… Manager 1 1 N Reports SalesPerson SalesPerson EmployeeID = 729742LoginID = peteTitle = "Developer"VacationHours = 0…ExpenseAccount = …CarLicenseNum = …… SalesPerson EmployeeID = 729742LoginID = peteTitle = "Developer"VacationHours = 0…ExpenseAccount = …CarLicenseNum = …… EmployeeID = 729742LoginID = peteTitle = "Developer"VacationHours = 0…ExpenseAccount = true…
EDM & Entity Framework? The Entity Framework (EF) is an Object Relational Modeling tool leveraging the EDM Focus on your domain, not how to persist! EDM is used to describe your model. Allows different rate of change between database and code! EF uses a storage model and mapping to enable this.
IEnumerable<T> LINQ to Entities Entity SQL Query Object Services EDM DataReader Entity SQL Conceptual Model Mapping Entity Data Provider DataReader SQL Storage Model ADO.NET Data Provider EF Model
Performance & Security? Connections to database vs. amount of data You can work with stored procedures  You can work with views You can define how the ADO.NET Entity Framework loads your data to  Eager  Lazy (Explicit)
Entity Framework in .NET 4 Model First T4 Templates to control code generation Supporting DDD approach with POCO  Persistence Ignorance Repository pattern Query Improvements Lazy Loading Disconnected API’s to enable N-tier
Easily Expose Your Entities WCF Data Services
WCF Data Services Overview Framework from Microsoft that that facilitates the creation of RESTful data services via HTTP endpoints Shipped with .NET 3.5 SP1 Updates for 3.5 SP1 and .NET 4.0 Built on top of WCF4 Data representation in ATOM or JSON
WCF Data Services Overview Automates the exposure of data as RESTful resources Anything that implements IQueryable<T> and IUpdatable<T> Entity Framework 3rd party ORMs LINQ to SQL, custom data driven CLR classes Custom URI based querying
HTTP http://localhost:1234/MyData.svc/MyEntities(10) Open Data Protocol (OData) Hosting/HTTP Listener Data Services Runtime var q = from e in MyEntities where id = 10 select e; Data Access Layer Entity Framework Custom LINQ Provider SELECT * FROM MyEntity WHERE id = 10 Relational Database Other Sources
Data Services - A REST Interface ,[object Object]
Entities and associations  resources and links,[object Object],[object Object]
WCF Data Services in .NET 4 Query Projections Query results can be modified to include only a subset of properties by using the new $select query option. Custom Data Service Providers Can implement a set of new data service provider interfaces, you can use various types of data with a data service, even when the data model changes during execution. Streaming of Binary Resources This enables you to retrieve and save binary large object data independent of the entity to which it belongs.
Summary
Resources ADO.NET Team Blog http://blogs.msdn.com/adonet/default.aspx EF Design Blog blogs.msdn.com/efdesign Visual Studio Data Blog http://blogs.msdn.com/vsdata/ dnrTV! http://shrinkster.com/1734 http://shrinkster.com/1735
Resources ADO.NET team blog http://blogs.msdn.com/adonet WCF Data Services team blog http://blogs.msdn.com/astoriateam

Contenu connexe

Tendances

Back-2-Basics: .NET Coding Standards For The Real World
Back-2-Basics: .NET Coding Standards For The Real WorldBack-2-Basics: .NET Coding Standards For The Real World
Back-2-Basics: .NET Coding Standards For The Real WorldDavid McCarter
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework OverviewEric Nelson
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework OverviewEyal Vardi
 
Entity Framework v2 Best Practices
Entity Framework v2 Best PracticesEntity Framework v2 Best Practices
Entity Framework v2 Best PracticesAndri Yadi
 
Entity framework 4.0
Entity framework 4.0Entity framework 4.0
Entity framework 4.0Abhishek Sur
 
Entity Framework - Entity Data Model (edm)
Entity Framework - Entity Data Model (edm)Entity Framework - Entity Data Model (edm)
Entity Framework - Entity Data Model (edm)Eyal Vardi
 
Microsoft Entity Framework
Microsoft Entity FrameworkMicrosoft Entity Framework
Microsoft Entity FrameworkMahmoud Tolba
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code firstConfiz
 
Introducing the Entity Framework
Introducing the Entity FrameworkIntroducing the Entity Framework
Introducing the Entity FrameworkLearnNowOnline
 
Entity framework
Entity frameworkEntity framework
Entity frameworkicubesystem
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity FrameworkDoncho Minkov
 
ADO.NET Data Services &amp; Entity Framework
ADO.NET Data Services &amp; Entity FrameworkADO.NET Data Services &amp; Entity Framework
ADO.NET Data Services &amp; Entity Frameworkdyana0106
 
LINQ to Relational in Visual Studio 2008 SP1
LINQ to Relational in Visual Studio 2008 SP1LINQ to Relational in Visual Studio 2008 SP1
LINQ to Relational in Visual Studio 2008 SP1ukdpe
 
Play With Windows Phone Local Database
Play With Windows Phone Local DatabasePlay With Windows Phone Local Database
Play With Windows Phone Local DatabaseFiyaz Hasan
 
Building Windows Phone Database App Using MVVM Pattern
Building Windows Phone Database App Using MVVM PatternBuilding Windows Phone Database App Using MVVM Pattern
Building Windows Phone Database App Using MVVM PatternFiyaz Hasan
 
Dealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NETDealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NETFernando G. Guerrero
 
Entity Framework: Nakov @ BFU Hackhaton 2015
Entity Framework: Nakov @ BFU Hackhaton 2015Entity Framework: Nakov @ BFU Hackhaton 2015
Entity Framework: Nakov @ BFU Hackhaton 2015Svetlin Nakov
 

Tendances (20)

Back-2-Basics: .NET Coding Standards For The Real World
Back-2-Basics: .NET Coding Standards For The Real WorldBack-2-Basics: .NET Coding Standards For The Real World
Back-2-Basics: .NET Coding Standards For The Real World
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overview
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overview
 
Ef code first
Ef code firstEf code first
Ef code first
 
Entity Framework v2 Best Practices
Entity Framework v2 Best PracticesEntity Framework v2 Best Practices
Entity Framework v2 Best Practices
 
Entity framework 4.0
Entity framework 4.0Entity framework 4.0
Entity framework 4.0
 
Entity Framework - Entity Data Model (edm)
Entity Framework - Entity Data Model (edm)Entity Framework - Entity Data Model (edm)
Entity Framework - Entity Data Model (edm)
 
Microsoft Entity Framework
Microsoft Entity FrameworkMicrosoft Entity Framework
Microsoft Entity Framework
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code first
 
Introducing the Entity Framework
Introducing the Entity FrameworkIntroducing the Entity Framework
Introducing the Entity Framework
 
Entity framework
Entity frameworkEntity framework
Entity framework
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity Framework
 
ADO.NET Data Services &amp; Entity Framework
ADO.NET Data Services &amp; Entity FrameworkADO.NET Data Services &amp; Entity Framework
ADO.NET Data Services &amp; Entity Framework
 
LINQ to Relational in Visual Studio 2008 SP1
LINQ to Relational in Visual Studio 2008 SP1LINQ to Relational in Visual Studio 2008 SP1
LINQ to Relational in Visual Studio 2008 SP1
 
Play With Windows Phone Local Database
Play With Windows Phone Local DatabasePlay With Windows Phone Local Database
Play With Windows Phone Local Database
 
Building Windows Phone Database App Using MVVM Pattern
Building Windows Phone Database App Using MVVM PatternBuilding Windows Phone Database App Using MVVM Pattern
Building Windows Phone Database App Using MVVM Pattern
 
Hibernate training-topics
Hibernate training-topicsHibernate training-topics
Hibernate training-topics
 
Dealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NETDealing with SQL Security from ADO.NET
Dealing with SQL Security from ADO.NET
 
Entity Framework: Nakov @ BFU Hackhaton 2015
Entity Framework: Nakov @ BFU Hackhaton 2015Entity Framework: Nakov @ BFU Hackhaton 2015
Entity Framework: Nakov @ BFU Hackhaton 2015
 
ODI User and Security
ODI User and Security ODI User and Security
ODI User and Security
 

En vedette

Global Outlet Mall_Logo_final
Global Outlet Mall_Logo_finalGlobal Outlet Mall_Logo_final
Global Outlet Mall_Logo_finalRana Gebrane
 
E-power Business card (approved)
E-power Business card (approved)E-power Business card (approved)
E-power Business card (approved)Rana Gebrane
 
Gracias Señor Por Un Año Mas
Gracias Señor Por Un Año Mas Gracias Señor Por Un Año Mas
Gracias Señor Por Un Año Mas Robinson Pulgarin
 
Animaciones de tres casos
Animaciones de tres casosAnimaciones de tres casos
Animaciones de tres casosricarzu
 
Funciones del lenguaje. unidad 2
Funciones del lenguaje. unidad 2Funciones del lenguaje. unidad 2
Funciones del lenguaje. unidad 2valerialaprincesita
 
8th Feb the Irish Times review of "The Backside of the Bills" by Sara Keating
8th Feb the Irish Times review of "The Backside of the Bills"  by Sara Keating 8th Feb the Irish Times review of "The Backside of the Bills"  by Sara Keating
8th Feb the Irish Times review of "The Backside of the Bills" by Sara Keating Hedda Kaphengst
 
Segunda sesión ebc
Segunda sesión ebcSegunda sesión ebc
Segunda sesión ebcrgarnica
 
33 - Hygienic Certificate VDI 6022
33 - Hygienic Certificate VDI 602233 - Hygienic Certificate VDI 6022
33 - Hygienic Certificate VDI 6022Mohammed Fayez
 
Automóviles. antonio horacio stiuso
Automóviles. antonio horacio stiusoAutomóviles. antonio horacio stiuso
Automóviles. antonio horacio stiusoAntonioCabrala
 
Communication networks at google
Communication networks at googleCommunication networks at google
Communication networks at googleSaurabh Gupta
 
Introduction to panchakarma in ayurveda
Introduction to panchakarma in ayurvedaIntroduction to panchakarma in ayurveda
Introduction to panchakarma in ayurvedaAbhay Kulkarni
 

En vedette (20)

Global Outlet Mall_Logo_final
Global Outlet Mall_Logo_finalGlobal Outlet Mall_Logo_final
Global Outlet Mall_Logo_final
 
Pye_resume_2016_InstrDesgn
Pye_resume_2016_InstrDesgnPye_resume_2016_InstrDesgn
Pye_resume_2016_InstrDesgn
 
E-power Business card (approved)
E-power Business card (approved)E-power Business card (approved)
E-power Business card (approved)
 
Gracias Señor Por Un Año Mas
Gracias Señor Por Un Año Mas Gracias Señor Por Un Año Mas
Gracias Señor Por Un Año Mas
 
Amador bueno
Amador buenoAmador bueno
Amador bueno
 
Cataloging Children's Materials
Cataloging Children's MaterialsCataloging Children's Materials
Cataloging Children's Materials
 
Blog
BlogBlog
Blog
 
Animaciones de tres casos
Animaciones de tres casosAnimaciones de tres casos
Animaciones de tres casos
 
Pesquisa igreja
Pesquisa igrejaPesquisa igreja
Pesquisa igreja
 
S.o aula 9101112
S.o aula 9101112S.o aula 9101112
S.o aula 9101112
 
S.o aula 1516
S.o aula 1516S.o aula 1516
S.o aula 1516
 
Funciones del lenguaje. unidad 2
Funciones del lenguaje. unidad 2Funciones del lenguaje. unidad 2
Funciones del lenguaje. unidad 2
 
8th Feb the Irish Times review of "The Backside of the Bills" by Sara Keating
8th Feb the Irish Times review of "The Backside of the Bills"  by Sara Keating 8th Feb the Irish Times review of "The Backside of the Bills"  by Sara Keating
8th Feb the Irish Times review of "The Backside of the Bills" by Sara Keating
 
Segunda sesión ebc
Segunda sesión ebcSegunda sesión ebc
Segunda sesión ebc
 
33 - Hygienic Certificate VDI 6022
33 - Hygienic Certificate VDI 602233 - Hygienic Certificate VDI 6022
33 - Hygienic Certificate VDI 6022
 
Google
GoogleGoogle
Google
 
Automóviles. antonio horacio stiuso
Automóviles. antonio horacio stiusoAutomóviles. antonio horacio stiuso
Automóviles. antonio horacio stiuso
 
Communication networks at google
Communication networks at googleCommunication networks at google
Communication networks at google
 
Introduction to panchakarma in ayurveda
Introduction to panchakarma in ayurvedaIntroduction to panchakarma in ayurveda
Introduction to panchakarma in ayurveda
 
Cym Yañez en Castilla y León Económica
Cym Yañez en Castilla y León EconómicaCym Yañez en Castilla y León Económica
Cym Yañez en Castilla y León Económica
 

Similaire à Building nTier Applications with Entity Framework Services

Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010David McCarter
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Igor Moochnick
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Jonas Follesø
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?ukdpe
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developersGlen Gordon
 
Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)David McCarter
 
dotnet development company
dotnet development companydotnet development company
dotnet development companyVelmurugan J
 
dotnet training center near vadapalani
dotnet training center near vadapalanidotnet training center near vadapalani
dotnet training center near vadapalaniVelmurugan J
 
DOTNET TRAINING CENTER IN CHENNAI
DOTNET TRAINING CENTER IN CHENNAI DOTNET TRAINING CENTER IN CHENNAI
DOTNET TRAINING CENTER IN CHENNAI Velmurugan J
 
dotnet training center in chennai
dotnet training center in chennai dotnet training center in chennai
dotnet training center in chennai Velmurugan J
 
dotnet courses in chennai
dotnet courses in chennai dotnet courses in chennai
dotnet courses in chennai Velmurugan J
 
dotnet training center in vadapalani
dotnet  training center in vadapalanidotnet  training center in vadapalani
dotnet training center in vadapalaniVelmurugan J
 
dotnet development
dotnet developmentdotnet development
dotnet developmentVelmurugan J
 
dotnet development company in chennai
dotnet development company in chennai dotnet development company in chennai
dotnet development company in chennai Velmurugan J
 
dotnet training center and development
dotnet training center and development dotnet training center and development
dotnet training center and development Velmurugan J
 
Dotnet training syallbus
Dotnet  training syallbusDotnet  training syallbus
Dotnet training syallbusVelmurugan J
 

Similaire à Building nTier Applications with Entity Framework Services (20)

Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010Building N Tier Applications With Entity Framework Services 2010
Building N Tier Applications With Entity Framework Services 2010
 
Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)Ado.Net Data Services (Astoria)
Ado.Net Data Services (Astoria)
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developers
 
Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)Building nTier Applications with Entity Framework Services (Part 2)
Building nTier Applications with Entity Framework Services (Part 2)
 
B_110500002
B_110500002B_110500002
B_110500002
 
dotnet development company
dotnet development companydotnet development company
dotnet development company
 
dotnet training center near vadapalani
dotnet training center near vadapalanidotnet training center near vadapalani
dotnet training center near vadapalani
 
DOTNET TRAINING CENTER IN CHENNAI
DOTNET TRAINING CENTER IN CHENNAI DOTNET TRAINING CENTER IN CHENNAI
DOTNET TRAINING CENTER IN CHENNAI
 
dotnet training center in chennai
dotnet training center in chennai dotnet training center in chennai
dotnet training center in chennai
 
dotnet courses in chennai
dotnet courses in chennai dotnet courses in chennai
dotnet courses in chennai
 
dotnet training center in vadapalani
dotnet  training center in vadapalanidotnet  training center in vadapalani
dotnet training center in vadapalani
 
dotnet development
dotnet developmentdotnet development
dotnet development
 
dotnet development company in chennai
dotnet development company in chennai dotnet development company in chennai
dotnet development company in chennai
 
dotnet syallbus
dotnet syallbus dotnet syallbus
dotnet syallbus
 
Dotnet courses
Dotnet  coursesDotnet  courses
Dotnet courses
 
dotnet training center and development
dotnet training center and development dotnet training center and development
dotnet training center and development
 
Dotnet training syallbus
Dotnet  training syallbusDotnet  training syallbus
Dotnet training syallbus
 
Practical OData
Practical ODataPractical OData
Practical OData
 

Plus de David McCarter

Röck Yoür Technical Interview - V3
Röck Yoür Technical Interview - V3Röck Yoür Technical Interview - V3
Röck Yoür Technical Interview - V3David McCarter
 
Rock Your Code With Code Contracts -2013
Rock Your Code With Code Contracts -2013Rock Your Code With Code Contracts -2013
Rock Your Code With Code Contracts -2013David McCarter
 
Rock Your Code with Code Contracts
Rock Your Code with Code ContractsRock Your Code with Code Contracts
Rock Your Code with Code ContractsDavid McCarter
 
.NET Coding Standards For The Real World (2012)
.NET Coding Standards For The Real World (2012).NET Coding Standards For The Real World (2012)
.NET Coding Standards For The Real World (2012)David McCarter
 
Back-2-Basics: Code Contracts
Back-2-Basics: Code ContractsBack-2-Basics: Code Contracts
Back-2-Basics: Code ContractsDavid McCarter
 
Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)David McCarter
 
How To Survive The Technical Interview
How To Survive The Technical InterviewHow To Survive The Technical Interview
How To Survive The Technical InterviewDavid McCarter
 
Real World API Design Using The Entity Framework Services
Real World API Design Using The Entity Framework ServicesReal World API Design Using The Entity Framework Services
Real World API Design Using The Entity Framework ServicesDavid McCarter
 
Code Easier With Visual Studio 2010 & Extensions
Code Easier With Visual Studio 2010 & ExtensionsCode Easier With Visual Studio 2010 & Extensions
Code Easier With Visual Studio 2010 & ExtensionsDavid McCarter
 
Back-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NETBack-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NETDavid McCarter
 
Back-2-Basics: .NET Coding Standards For The Real World
Back-2-Basics: .NET Coding Standards For The Real WorldBack-2-Basics: .NET Coding Standards For The Real World
Back-2-Basics: .NET Coding Standards For The Real WorldDavid McCarter
 
Back-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NETBack-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NETDavid McCarter
 

Plus de David McCarter (12)

Röck Yoür Technical Interview - V3
Röck Yoür Technical Interview - V3Röck Yoür Technical Interview - V3
Röck Yoür Technical Interview - V3
 
Rock Your Code With Code Contracts -2013
Rock Your Code With Code Contracts -2013Rock Your Code With Code Contracts -2013
Rock Your Code With Code Contracts -2013
 
Rock Your Code with Code Contracts
Rock Your Code with Code ContractsRock Your Code with Code Contracts
Rock Your Code with Code Contracts
 
.NET Coding Standards For The Real World (2012)
.NET Coding Standards For The Real World (2012).NET Coding Standards For The Real World (2012)
.NET Coding Standards For The Real World (2012)
 
Back-2-Basics: Code Contracts
Back-2-Basics: Code ContractsBack-2-Basics: Code Contracts
Back-2-Basics: Code Contracts
 
Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)Back-2-Basics: .NET Coding Standards For The Real World (2011)
Back-2-Basics: .NET Coding Standards For The Real World (2011)
 
How To Survive The Technical Interview
How To Survive The Technical InterviewHow To Survive The Technical Interview
How To Survive The Technical Interview
 
Real World API Design Using The Entity Framework Services
Real World API Design Using The Entity Framework ServicesReal World API Design Using The Entity Framework Services
Real World API Design Using The Entity Framework Services
 
Code Easier With Visual Studio 2010 & Extensions
Code Easier With Visual Studio 2010 & ExtensionsCode Easier With Visual Studio 2010 & Extensions
Code Easier With Visual Studio 2010 & Extensions
 
Back-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NETBack-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NET
 
Back-2-Basics: .NET Coding Standards For The Real World
Back-2-Basics: .NET Coding Standards For The Real WorldBack-2-Basics: .NET Coding Standards For The Real World
Back-2-Basics: .NET Coding Standards For The Real World
 
Back-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NETBack-2-Basics: Exception & Event Instrumentation in .NET
Back-2-Basics: Exception & Event Instrumentation in .NET
 

Dernier

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Dernier (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Building nTier Applications with Entity Framework Services

  • 1. Building nTier Applications with Entity Framework Services
  • 2.
  • 3. dotNetDave Conference DVD! Packed full of: Videos of all sessions from 2010 & 2011(1)! Slide decks from 2011 & 2010! Demo projects from 2011 & 2010! David McCarter’s .NET interview Questions! Extras Conference Photos from 2010! Surprise videos! Book + DVD $25! Only $15!
  • 4. Check Out Your Local User Groups! San Diego Cloud Computing User Group www.azureusergroup.com/group/sandiegoazureusergroup San Diego .NET Developers Group www.sddotnetdg.org San Diego .NET User Group www.sandiegodotnet.com San Diego SQL Server User Group www.sdsqlug.org
  • 7. Where’s Your Data Model? Applications Today… Implicitly Contain the Data Model Logic and Model Intertwined Conceptual Mismatch Often encapsulate in a "Data Access Layer"
  • 8.
  • 9. Applications work with a well Defined Model
  • 11. Declarative mapping between application and storage models
  • 12.
  • 14. The Dilemma Software Architects & Developers Database Designers & Administrators
  • 15. Object Relational Mapping What is ORM? Technique for working with relational tables as if they were objects in memory Intention is to hide away the complexity of the underlying tables and give a uniform way of working with data
  • 16. Object Relational Mapping Why use ORM? Productivity Retain database independence Database portability Objects ► Classes ► Entities
  • 17. Many attempts Typed Datasets Objectspaces ‘v1’ Objectspaces ‘v2’ Microsoft Business Framework WinFS Linq to SQL NHibernate  Will “RIP”  Not Microsoft’s
  • 19. The Microsoft Entity Data Model An extended relational model with Entity-Relationship Model concepts Entity Types Strong type with Identity Inheritance Scalar/Complex properties EntitySets Hold instances of Entity Types Similar to relational tables Can have multiple Entitysets of the same EntityTypes Relationships ("Associations") Named relationships between Entities 0..1:*, 0..1:0..1, 1:1, 1:M, M:N Navigation may be exposed as NavigationProperties on EntityTypes AssociationSets Contains instances of associations May be queried directly EntityContainers Contains EntitySets, AssociationSets SalesPerson EmployeeID = 294272LoginID = adamTitle = "Dev Lead"VacationHours = 0… Manager 1 1 N Reports SalesPerson SalesPerson EmployeeID = 729742LoginID = peteTitle = "Developer"VacationHours = 0…ExpenseAccount = …CarLicenseNum = …… SalesPerson EmployeeID = 729742LoginID = peteTitle = "Developer"VacationHours = 0…ExpenseAccount = …CarLicenseNum = …… EmployeeID = 729742LoginID = peteTitle = "Developer"VacationHours = 0…ExpenseAccount = true…
  • 20. EDM & Entity Framework? The Entity Framework (EF) is an Object Relational Modeling tool leveraging the EDM Focus on your domain, not how to persist! EDM is used to describe your model. Allows different rate of change between database and code! EF uses a storage model and mapping to enable this.
  • 21. IEnumerable<T> LINQ to Entities Entity SQL Query Object Services EDM DataReader Entity SQL Conceptual Model Mapping Entity Data Provider DataReader SQL Storage Model ADO.NET Data Provider EF Model
  • 22. Performance & Security? Connections to database vs. amount of data You can work with stored procedures You can work with views You can define how the ADO.NET Entity Framework loads your data to Eager Lazy (Explicit)
  • 23.
  • 24.
  • 25. Entity Framework in .NET 4 Model First T4 Templates to control code generation Supporting DDD approach with POCO Persistence Ignorance Repository pattern Query Improvements Lazy Loading Disconnected API’s to enable N-tier
  • 26. Easily Expose Your Entities WCF Data Services
  • 27. WCF Data Services Overview Framework from Microsoft that that facilitates the creation of RESTful data services via HTTP endpoints Shipped with .NET 3.5 SP1 Updates for 3.5 SP1 and .NET 4.0 Built on top of WCF4 Data representation in ATOM or JSON
  • 28. WCF Data Services Overview Automates the exposure of data as RESTful resources Anything that implements IQueryable<T> and IUpdatable<T> Entity Framework 3rd party ORMs LINQ to SQL, custom data driven CLR classes Custom URI based querying
  • 29. HTTP http://localhost:1234/MyData.svc/MyEntities(10) Open Data Protocol (OData) Hosting/HTTP Listener Data Services Runtime var q = from e in MyEntities where id = 10 select e; Data Access Layer Entity Framework Custom LINQ Provider SELECT * FROM MyEntity WHERE id = 10 Relational Database Other Sources
  • 30.
  • 31.
  • 32. WCF Data Services in .NET 4 Query Projections Query results can be modified to include only a subset of properties by using the new $select query option. Custom Data Service Providers Can implement a set of new data service provider interfaces, you can use various types of data with a data service, even when the data model changes during execution. Streaming of Binary Resources This enables you to retrieve and save binary large object data independent of the entity to which it belongs.
  • 33.
  • 34.
  • 36. Resources ADO.NET Team Blog http://blogs.msdn.com/adonet/default.aspx EF Design Blog blogs.msdn.com/efdesign Visual Studio Data Blog http://blogs.msdn.com/vsdata/ dnrTV! http://shrinkster.com/1734 http://shrinkster.com/1735
  • 37. Resources ADO.NET team blog http://blogs.msdn.com/adonet WCF Data Services team blog http://blogs.msdn.com/astoriateam

Notes de l'éditeur

  1. Goals:To show a new way of serving up dateGet you thinking to learn more when you leave this presentation
  2. Maintainabity, security, efficiency andscalability let a DBA decideto:Splitdata of oneentityintoseveraltablesPutting data forseveral types of entitiesintosametableSupply projectionsthatlooseentity concepts thatmight have been present in tablestructures
  3. Talk about the separation between database developer and programmer.
  4. Talk about the separation between database developer and programmer.
  5. Typed Datasets – shippedObjectspaces ‘v1’ – never shippedObjectspaces ‘v2’ – never shippedMicrosoft Business Framework – never shippedWinFS – never shippedLinq to SQL – shipped, won’t be discontinuedLinq to Entities – shippedEntity Framework- shipped 
  6. Applications can work in terms of a more application-centric conceptual model, including types with inheritance, complex members, and relationships.Applications are freed from hard-coded dependencies on a particular data engine or storage schema.Mappings between the conceptual model and the storage-specific schema can change without changing the application code.Developers can work with a consistent application object model that can be mapped to various storage schemas, possibly implemented in different database management systems.Multiple conceptual models can be mapped to a single storage schema.Language-integrated query (LINQ) support provides compile-time syntax validation for queries against a conceptual model.
  7. Explain the inner workings of the entity framework Three types of commands: LINQ to Entities against Object Services Materialization to Conceptual model classes or anonymous classes if projected Entity Sqlagaints Object Services Materialization if no projection + streamed data on row level Call model defines functions or specific Entity SQL functions. Entity Sql against Entity Client No materialization + streamed data on column levelExplain the path of commands…
  8. http://www.robbagby.com/entity-framework/is-lazy-loading-in-ef-4-evil-or-the-second-coming/
  9. Demo: AdventureWorks.DataDemo: AdvertureWorks.ExampleDemo: EntityDesignerDiagram.png
  10. Demo: AdvertureWorksServiceDemo: AdventureWorks.Client