SlideShare une entreprise Scribd logo
1  sur  37
Building nTier Applications with Entity Framework Services
Agenda
Overview
nTier Architecture Overview Model to create flexible reusable applications Only need to modify or add layers instead of rewriting entire applications over
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 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 Why use ORM? Productivity Retain database independence ObjectsClassesEntities
 Object Relational Mapping There are many ORMs for .NET developers already in existence. E.g. LLBLGen Pro http://www.llblgen.com/ Nhibernate http://www.hibernate.org/343.html EntitySpaces http://www.entityspaces.net/Portal/Default.aspx
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.
ADO.NET Entity Framework
EF Providers in Progress
LINQ to Entities – Lots of Topics
Using Entity Framework with ASP.NET
Pain Points in v3.5 SP1 Pluralization/ Singularization Foreign Keys Model First Lazy Loading Additional LINQ Operators L2S Features & Patterns SQL Gen Improvements
Entity Framework in .NET 4 Improvements: 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
Data Services Overview Extends Windows Communication Foundation Functionality CRUD access to data over RESTful web services Built-in URI-based query syntax Client-side libraries for .NET and AJAX clients
Data Services HTTP Open Data Protocol Hosting/HTTP Listener Data Services Runtime IQueryable/IEnumerable [+ IUpdatable] Data Access Layer Entity Framework Custom LINQ Provider Relational database Other sources
Data Services - A REST Interface ,[object Object]
Entities and associations  resources and links,[object Object]
URL Conventions Addressing entities and sets ,[object Object],[object Object]
"Traditional" Applications Web applications Data services client can be used in ASP.NET ASP.NET data source control for accessing remote services Desktop applications Fully-featured .NET client library Same API in desktop and Silverlight environments
What’s New in .NET 4 Data Binding New DataServiceCollection class provides simplified binding of data service data to (WPF) controls. Includes auto updating. Counting Entities in an Set  $count - total number of resources returned by a URI $inlinecount - total resource count together with the resource data Server-driven Paging  Service can be configured to return requested resources as a set of paged responses
What’s New 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
Conclusion
Before You Begin… What I Have Learned So Far About The Entity Framework and ADO.NET Data Services http://dotnettips.com/2008/09/30/WhatIHaveLearnedSoFarAboutTheEntityFrameworkAndADONETDataServices.aspx *Part 2 coming out soon! Using Microsoft ADO.NET Data Services http://msdn.microsoft.com/en-us/library/cc907912.aspx
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 Dan Simmons Blog http://blogs.msdn.com/dsimmons/ MSDN Code Gallery http://shrinkster.com/1733 WCF Data Services Learning Guide: http://msdn.microsoft.com/en-us/data/bb931106.aspx WCF Data Services Team Blog http://blogs.msdn.com/astoriateam/default.aspx

Contenu connexe

Tendances

Microsoft Entity Framework
Microsoft Entity FrameworkMicrosoft Entity Framework
Microsoft Entity FrameworkMahmoud Tolba
 
Azure DocumentDb Training - Accessing DocumentDb from .net
Azure DocumentDb Training  - Accessing DocumentDb from .netAzure DocumentDb Training  - Accessing DocumentDb from .net
Azure DocumentDb Training - Accessing DocumentDb from .netMarco Parenzan
 
Library Web Services for Discovery and Delivery of Scientific Information
Library Web Services for Discovery and Delivery of Scientific InformationLibrary Web Services for Discovery and Delivery of Scientific Information
Library Web Services for Discovery and Delivery of Scientific InformationRichard Akerman
 
Introducing Entity Framework Core
Introducing Entity Framework CoreIntroducing Entity Framework Core
Introducing Entity Framework CoreJoy Sarker
 
Azure DocumentDb Training - Resource Model
Azure DocumentDb Training - Resource ModelAzure DocumentDb Training - Resource Model
Azure DocumentDb Training - Resource ModelMarco Parenzan
 
C# Code Samples
C# Code SamplesC# Code Samples
C# Code Samplesastruck
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Bruce Johnson
 
Asp net interview_questions
Asp net interview_questionsAsp net interview_questions
Asp net interview_questionsBilam
 
Encompassing Information Integration
Encompassing Information IntegrationEncompassing Information Integration
Encompassing Information Integrationnguyenfilip
 
Architecting Cloudy Applications
Architecting Cloudy ApplicationsArchitecting Cloudy Applications
Architecting Cloudy ApplicationsDavid Chou
 
Introduction to PredictionIO
Introduction to PredictionIOIntroduction to PredictionIO
Introduction to PredictionIOMuhammet Arslan
 
Whats new in Access Services 2013?
Whats new in Access Services 2013?Whats new in Access Services 2013?
Whats new in Access Services 2013?James Milne
 
Entity framework 4.0
Entity framework 4.0Entity framework 4.0
Entity framework 4.0Abhishek Sur
 
SAP BusinessObjects Web Intelligence Report
SAP BusinessObjects Web Intelligence ReportSAP BusinessObjects Web Intelligence Report
SAP BusinessObjects Web Intelligence ReportBigClasses Com
 

Tendances (20)

What is hibernate?
What is hibernate?What is hibernate?
What is hibernate?
 
contentDM
contentDMcontentDM
contentDM
 
Microsoft Entity Framework
Microsoft Entity FrameworkMicrosoft Entity Framework
Microsoft Entity Framework
 
Azure DocumentDb Training - Accessing DocumentDb from .net
Azure DocumentDb Training  - Accessing DocumentDb from .netAzure DocumentDb Training  - Accessing DocumentDb from .net
Azure DocumentDb Training - Accessing DocumentDb from .net
 
Library Web Services for Discovery and Delivery of Scientific Information
Library Web Services for Discovery and Delivery of Scientific InformationLibrary Web Services for Discovery and Delivery of Scientific Information
Library Web Services for Discovery and Delivery of Scientific Information
 
Introducing Entity Framework Core
Introducing Entity Framework CoreIntroducing Entity Framework Core
Introducing Entity Framework Core
 
Azure DocumentDb Training - Resource Model
Azure DocumentDb Training - Resource ModelAzure DocumentDb Training - Resource Model
Azure DocumentDb Training - Resource Model
 
LINQ in C#
LINQ in C#LINQ in C#
LINQ in C#
 
C# Code Samples
C# Code SamplesC# Code Samples
C# Code Samples
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0
 
Asp net interview_questions
Asp net interview_questionsAsp net interview_questions
Asp net interview_questions
 
Hibernate training-topics
Hibernate training-topicsHibernate training-topics
Hibernate training-topics
 
Encompassing Information Integration
Encompassing Information IntegrationEncompassing Information Integration
Encompassing Information Integration
 
W8/WP8 App Dev for SAP, Part 2: Microsoft OData Application Development
W8/WP8 App Dev for SAP, Part 2: Microsoft OData Application DevelopmentW8/WP8 App Dev for SAP, Part 2: Microsoft OData Application Development
W8/WP8 App Dev for SAP, Part 2: Microsoft OData Application Development
 
Linq in asp.net
Linq in asp.netLinq in asp.net
Linq in asp.net
 
Architecting Cloudy Applications
Architecting Cloudy ApplicationsArchitecting Cloudy Applications
Architecting Cloudy Applications
 
Introduction to PredictionIO
Introduction to PredictionIOIntroduction to PredictionIO
Introduction to PredictionIO
 
Whats new in Access Services 2013?
Whats new in Access Services 2013?Whats new in Access Services 2013?
Whats new in Access Services 2013?
 
Entity framework 4.0
Entity framework 4.0Entity framework 4.0
Entity framework 4.0
 
SAP BusinessObjects Web Intelligence Report
SAP BusinessObjects Web Intelligence ReportSAP BusinessObjects Web Intelligence Report
SAP BusinessObjects Web Intelligence Report
 

En vedette

N tier web applications
N tier web applicationsN tier web applications
N tier web applicationsMike Feltman
 
Building n-Tier ASP.NET WebForms with Entity Framework 4, Lerman
Building n-Tier ASP.NET WebForms with Entity Framework 4, LermanBuilding n-Tier ASP.NET WebForms with Entity Framework 4, Lerman
Building n-Tier ASP.NET WebForms with Entity Framework 4, LermanJulie Lerman
 
E business n_tier_arch
E business n_tier_archE business n_tier_arch
E business n_tier_archRadiant Minds
 
N-tier Application Developement
N-tier Application DevelopementN-tier Application Developement
N-tier Application DevelopementDetectivee Mirza
 
N-tier and oop - moving across technologies
N-tier and oop - moving across technologiesN-tier and oop - moving across technologies
N-tier and oop - moving across technologiesJacinto Limjap
 
J2EE and layered architecture
J2EE and layered architectureJ2EE and layered architecture
J2EE and layered architectureSuman Behara
 
N-Tier, Layered Design, SOA
N-Tier, Layered Design, SOAN-Tier, Layered Design, SOA
N-Tier, Layered Design, SOASperasoft
 

En vedette (8)

N tier web applications
N tier web applicationsN tier web applications
N tier web applications
 
Building n-Tier ASP.NET WebForms with Entity Framework 4, Lerman
Building n-Tier ASP.NET WebForms with Entity Framework 4, LermanBuilding n-Tier ASP.NET WebForms with Entity Framework 4, Lerman
Building n-Tier ASP.NET WebForms with Entity Framework 4, Lerman
 
E business n_tier_arch
E business n_tier_archE business n_tier_arch
E business n_tier_arch
 
N-tier Application Developement
N-tier Application DevelopementN-tier Application Developement
N-tier Application Developement
 
N-tier and oop - moving across technologies
N-tier and oop - moving across technologiesN-tier and oop - moving across technologies
N-tier and oop - moving across technologies
 
N tier
N tierN tier
N tier
 
J2EE and layered architecture
J2EE and layered architectureJ2EE and layered architecture
J2EE and layered architecture
 
N-Tier, Layered Design, SOA
N-Tier, Layered Design, SOAN-Tier, Layered Design, SOA
N-Tier, Layered Design, SOA
 

Similaire à Building N Tier Applications With Entity Framework Services 2010

Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)David McCarter
 
Programming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVCProgramming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVCIan Carnaghan
 
Ado.net entity framework_4.0
Ado.net entity framework_4.0Ado.net entity framework_4.0
Ado.net entity framework_4.0Rishu Mehra
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?ukdpe
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxKnoldus Inc.
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity FrameworkHasnain Iqbal
 
Asp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity FrameworkAsp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity FrameworkShravan A
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code FirstElements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code FirstEnea Gabriel
 
ArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudMicrosoft ArcReady
 
.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13aminmesbahi
 
Build Business Web Applications with PHPOpenbiz Framework and Cubi Platform
Build Business Web Applications with PHPOpenbiz Framework and Cubi PlatformBuild Business Web Applications with PHPOpenbiz Framework and Cubi Platform
Build Business Web Applications with PHPOpenbiz Framework and Cubi PlatformAgus Suhartono
 
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
 
Microsoft Data Access Technologies
Microsoft Data Access TechnologiesMicrosoft Data Access Technologies
Microsoft Data Access TechnologiesDavid Chou
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Bluegrass Digital
 
SAP BO ONLINE TRAINING
SAP BO ONLINE TRAININGSAP BO ONLINE TRAINING
SAP BO ONLINE TRAININGMadhukar Reddy
 
PayaPal-Resume
PayaPal-ResumePayaPal-Resume
PayaPal-ResumePayal Pal
 
Entity Framework 4 In Microsoft Visual Studio 2010
Entity Framework 4 In Microsoft Visual Studio 2010Entity Framework 4 In Microsoft Visual Studio 2010
Entity Framework 4 In Microsoft Visual Studio 2010Eric Nelson
 

Similaire à Building N Tier Applications With Entity Framework Services 2010 (20)

Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)Building nTier Applications with Entity Framework Services (Part 1)
Building nTier Applications with Entity Framework Services (Part 1)
 
Entity framework
Entity frameworkEntity framework
Entity framework
 
Programming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVCProgramming is Fun with ASP.NET MVC
Programming is Fun with ASP.NET MVC
 
70487.pdf
70487.pdf70487.pdf
70487.pdf
 
Ado.net entity framework_4.0
Ado.net entity framework_4.0Ado.net entity framework_4.0
Ado.net entity framework_4.0
 
What's New for Data?
What's New for Data?What's New for Data?
What's New for Data?
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity Framework
 
Asp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity FrameworkAsp.Net Core MVC with Entity Framework
Asp.Net Core MVC with Entity Framework
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code FirstElements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code First
 
ArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudArcReady - Architecting For The Cloud
ArcReady - Architecting For The Cloud
 
.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13.NET Core, ASP.NET Core Course, Session 13
.NET Core, ASP.NET Core Course, Session 13
 
Build Business Web Applications with PHPOpenbiz Framework and Cubi Platform
Build Business Web Applications with PHPOpenbiz Framework and Cubi PlatformBuild Business Web Applications with PHPOpenbiz Framework and Cubi Platform
Build Business Web Applications with PHPOpenbiz Framework and Cubi Platform
 
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
 
Microsoft Data Access Technologies
Microsoft Data Access TechnologiesMicrosoft Data Access Technologies
Microsoft Data Access Technologies
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
 
SAP BO ONLINE TRAINING
SAP BO ONLINE TRAININGSAP BO ONLINE TRAINING
SAP BO ONLINE TRAINING
 
PayaPal-Resume
PayaPal-ResumePayaPal-Resume
PayaPal-Resume
 
Netfx4
Netfx4Netfx4
Netfx4
 
Entity Framework 4 In Microsoft Visual Studio 2010
Entity Framework 4 In Microsoft Visual Studio 2010Entity Framework 4 In Microsoft Visual Studio 2010
Entity Framework 4 In Microsoft Visual Studio 2010
 

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

Plus de David McCarter (14)

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
 
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
 
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)
 
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
 
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
 
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)
 

Dernier

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Dernier (20)

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Building N Tier Applications With Entity Framework Services 2010

  • 1. Building nTier Applications with Entity Framework Services
  • 2.
  • 5. nTier Architecture Overview Model to create flexible reusable applications Only need to modify or add layers instead of rewriting entire applications over
  • 6. 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"
  • 7.
  • 8. Applications work with a well Defined Model
  • 10. Declarative mapping between application and storage models
  • 11.
  • 12. 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 Why use ORM? Productivity Retain database independence ObjectsClassesEntities
  • 13. Object Relational Mapping There are many ORMs for .NET developers already in existence. E.g. LLBLGen Pro http://www.llblgen.com/ Nhibernate http://www.hibernate.org/343.html EntitySpaces http://www.entityspaces.net/Portal/Default.aspx
  • 14. 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…
  • 15. 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.
  • 17. EF Providers in Progress
  • 18. LINQ to Entities – Lots of Topics
  • 19.
  • 20. Using Entity Framework with ASP.NET
  • 21. Pain Points in v3.5 SP1 Pluralization/ Singularization Foreign Keys Model First Lazy Loading Additional LINQ Operators L2S Features & Patterns SQL Gen Improvements
  • 22. Entity Framework in .NET 4 Improvements: 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
  • 23. Easily Expose Your Entities WCF Data Services
  • 24. Data Services Overview Extends Windows Communication Foundation Functionality CRUD access to data over RESTful web services Built-in URI-based query syntax Client-side libraries for .NET and AJAX clients
  • 25. Data Services HTTP Open Data Protocol Hosting/HTTP Listener Data Services Runtime IQueryable/IEnumerable [+ IUpdatable] Data Access Layer Entity Framework Custom LINQ Provider Relational database Other sources
  • 26.
  • 27.
  • 28.
  • 29. "Traditional" Applications Web applications Data services client can be used in ASP.NET ASP.NET data source control for accessing remote services Desktop applications Fully-featured .NET client library Same API in desktop and Silverlight environments
  • 30. What’s New in .NET 4 Data Binding New DataServiceCollection class provides simplified binding of data service data to (WPF) controls. Includes auto updating. Counting Entities in an Set $count - total number of resources returned by a URI $inlinecount - total resource count together with the resource data Server-driven Paging Service can be configured to return requested resources as a set of paged responses
  • 31. What’s New 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.
  • 32.
  • 35. Before You Begin… What I Have Learned So Far About The Entity Framework and ADO.NET Data Services http://dotnettips.com/2008/09/30/WhatIHaveLearnedSoFarAboutTheEntityFrameworkAndADONETDataServices.aspx *Part 2 coming out soon! Using Microsoft ADO.NET Data Services http://msdn.microsoft.com/en-us/library/cc907912.aspx
  • 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 Dan Simmons Blog http://blogs.msdn.com/dsimmons/ MSDN Code Gallery http://shrinkster.com/1733 WCF Data Services Learning Guide: http://msdn.microsoft.com/en-us/data/bb931106.aspx WCF Data Services Team Blog http://blogs.msdn.com/astoriateam/default.aspx

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. How do you or have you designed your applications??? Be truthful!!N-tier application architecture provides a model for developers to create a flexible and reusable application. By breaking up an application into tiers, developers only have to modify or add a specific layer, rather than have to rewrite the entire application over, if they decide to change technologies or scale up. In the term "N-tier," "N" implies any number -- like 2-tier, or 4-tier; basically, any number of distinct tiers used in your architecture. Application architectures are part of Layer 7 of the OSI model.
  3. Talk about the separation between database developer and programmer.
  4. Talk about the separation between database developer and programmer.
  5. 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.
  6. POCO = Plane Old .NET Classes
  7. Demo: AdventureWorks.DataDemo: AdvertureWorks.ExampleDemo: EntityDesignerDiagram.png
  8. AdventureWorks.AdminAdd entity referenceAdd Reference to System.Data.EntityAdd connection string to web.configShow ProductCategories table.
  9. Talk about any object can be exposed via EF!
  10. Demo: AdvertureWorksServiceDemo: AdventureWorks.Client