SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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 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
 
dotnet courses in chennai
dotnet courses in chennai dotnet courses in chennai
dotnet courses in chennai Velmurugan J
 

Ähnlich wie 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 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
 
dotnet courses in chennai
dotnet courses in chennai dotnet courses in chennai
dotnet courses in chennai
 
Practical OData
Practical ODataPractical OData
Practical OData
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Kürzlich hochgeladen (20)

What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

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

Hinweis der Redaktion

  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