SlideShare a Scribd company logo
Using POCOS in Entity Framework 4Part 1 Julie Lerman thedatafarm.com/blog jlerman@thedatafarm.com Julia Lerman  October 17th 2009, New England Code Camp 12
Note to Viewers This is Part 1 of a two part presentation. Part 2 covers testing and other patterns and how EF4 supports them. It was presented by Jamie Phillips. You can find his presentation at http://devblog.petrellyn.com/?p=189 Julia Lerman  October 17th 2009, New England Code Camp 12
Julie Lerman Julia Lerman  October 17th 2009, New England Code Camp 12 website theDataFarm.com blog & twitter theDataFarm.com/blog@julielermanVT book web site LearnEntityFramework.com consultant/mentor Microsoft MVP, INETA Speaker,ASPInsider, MCP, VTdotNET Leader
Agenda Standard EntityObject Classes Simple POCO Classes POCO and Proxies Generate POCO Classes with T4 Code-Only Development  Julia Lerman  October 17th 2009, New England Code Camp 12
EF1 & Default EF4 Gen’d Classes CustomTool=EntityModelCodeGenerator Julia Lerman  October 17th 2009, New England Code Camp 12
POCO: Plain Old CLR Object Define your classes Not bound to other APIs e.g. no inheritance from EntityObject Classes are reusable Simplifies testing and more… Julia Lerman  October 17th 2009, New England Code Camp 12
How Does EF4 Support POCO? EntityObjects interact with context For POCO, context does all of the work Classes don’t need to know about context Help provided by Special context methods Additional support via proxies Julia Lerman  October 17th 2009, New England Code Camp 12
Basic POCO Support Turn off code generation from EDMX “Convention” will auto-map classes/entities Julia Lerman  October 17th 2009, New England Code Camp 12
POCO and Other EF Features Complex Types: Supported Use a class (no structs) to represent the type Lazy Loading Declare property as virtual EF uses a proxy instance at runtime to load Explicit Loading ObjectContext.LoadProperty(myObj,”PropertyName”) ObjectCOntext.LoadProperty(myObj, o=>o.property) Julia Lerman  October 17th 2009, New England Code Camp 12
Change Tracking Options Snapshot Default change tracking Collected with DetectChanges is called Notification based virtual properties use Proxies Proxies can provide notification to context Julia Lerman  October 17th 2009, New England Code Camp 12
POCO Classes from Model Julia Lerman  October 17th 2009, New England Code Camp 12 T4 Text Template Transformation Toolkit
Code-Only Design Part of the Feature CTP No model at all Metadata is inferred from classes Convention by Default EF will rely 100% on presumptions Configuration Follows Tweak configurations to modify behavior Julia Lerman  October 17th 2009, New England Code Camp 12
Self-Tracking Entities Part of Feature CTP T4 Template to create specialized POCO classes EntityState is tracked by entity Specialized methods that know what to expect from the classes Julia Lerman  October 17th 2009, New England Code Camp 12
Resources LearnEntityFramework.com/resources blogs.msdn.com/adonet, efdesign, dsimmons, alexj, more... msdn.microsoft.com/data Gateway to whitepapers, forums, documentation Julia Lerman  October 17th 2009, New England Code Camp 12
Contact Julia Lerman  October 17th 2009, New England Code Camp 12 website theDataFarm.com blog & twitter theDataFarm.com/blog@julielermanVT book web site LearnEntityFramework.com consultant/mentor Microsoft MVP, INETA Speaker,ASPInsider, MCP, VTdotNET Leader

More Related Content

What's hot

Polymorphism
PolymorphismPolymorphism
Polymorphism
zindadili
 
Raspberry using Python Session 1
Raspberry using Python Session 1Raspberry using Python Session 1
Raspberry using Python Session 1
Mohamed Abd Ela'al
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
Nochiketa Chakraborty
 
Lecture 3 java basics
Lecture 3 java basicsLecture 3 java basics
Lecture 3 java basics
the_wumberlog
 
Python45 2
Python45 2Python45 2
Python45 2
Al Sayed Gamal
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
Swarit Wadhe
 
207 le boeuf_en
207 le boeuf_en207 le boeuf_en
207 le boeuf_en
Patrick Le Boeuf
 
python training | python course | python online training
python training |  python course |  python online trainingpython training |  python course |  python online training
python training | python course | python online training
Nancy Thomas
 
java: basics, user input, data type, constructor
java:  basics, user input, data type, constructorjava:  basics, user input, data type, constructor
java: basics, user input, data type, constructor
Shivam Singhal
 
From Java to Kotlin
From Java to KotlinFrom Java to Kotlin
From Java to Kotlin
João Ferrão
 

What's hot (10)

Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Raspberry using Python Session 1
Raspberry using Python Session 1Raspberry using Python Session 1
Raspberry using Python Session 1
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Lecture 3 java basics
Lecture 3 java basicsLecture 3 java basics
Lecture 3 java basics
 
Python45 2
Python45 2Python45 2
Python45 2
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 
207 le boeuf_en
207 le boeuf_en207 le boeuf_en
207 le boeuf_en
 
python training | python course | python online training
python training |  python course |  python online trainingpython training |  python course |  python online training
python training | python course | python online training
 
java: basics, user input, data type, constructor
java:  basics, user input, data type, constructorjava:  basics, user input, data type, constructor
java: basics, user input, data type, constructor
 
From Java to Kotlin
From Java to KotlinFrom Java to Kotlin
From Java to Kotlin
 

Similar to Using Entity Framework's New POCO Features: Part 1, by Julie Lerman

What's New in Entity Framework 4, by Julie Lerman
What's New in Entity Framework 4, by Julie LermanWhat's New in Entity Framework 4, by Julie Lerman
What's New in Entity Framework 4, by Julie Lerman
Julie Lerman
 
Entity Framework NYC Firestarter
Entity Framework NYC FirestarterEntity Framework NYC Firestarter
Entity Framework NYC Firestarter
Julie Lerman
 
Spring ActionScript
Spring ActionScriptSpring ActionScript
Spring ActionScript
Christophe Herreman
 
Julie Lerman Agile Entity Framework (March 2010)
Julie Lerman Agile Entity Framework (March 2010)Julie Lerman Agile Entity Framework (March 2010)
Julie Lerman Agile Entity Framework (March 2010)
Julie Lerman
 
Selenium training-course-content-syllabus-credo systemz
Selenium training-course-content-syllabus-credo systemzSelenium training-course-content-syllabus-credo systemz
Selenium training-course-content-syllabus-credo systemz
Training Institute
 
Persistence Ignorance in Entity Framework 4, Julie Lerman
Persistence Ignorance in Entity Framework 4, Julie LermanPersistence Ignorance in Entity Framework 4, Julie Lerman
Persistence Ignorance in Entity Framework 4, Julie Lerman
Julie Lerman
 
Persistence Ignorance in Entity Framework 4, Julie Lerman
Persistence Ignorance in Entity Framework 4, Julie LermanPersistence Ignorance in Entity Framework 4, Julie Lerman
Persistence Ignorance in Entity Framework 4, Julie Lerman
Julie Lerman
 
Selenium training12 1
Selenium training12 1Selenium training12 1
Selenium training12 1
AmanCSE1
 
Selenium training12 1
Selenium training12 1Selenium training12 1
Selenium training12 1
AmanCSE1
 
Selenium training-course-content
Selenium training-course-contentSelenium training-course-content
Selenium training-course-content
AmanCSE1
 
EclipseCon 2009: TmL Tutorial
EclipseCon 2009: TmL TutorialEclipseCon 2009: TmL Tutorial
EclipseCon 2009: TmL Tutorial
Eric Cloninger
 
Selenium webdriver course content rakesh hansalia
Selenium webdriver course content rakesh hansaliaSelenium webdriver course content rakesh hansalia
Selenium webdriver course content rakesh hansalia
Rakesh Hansalia
 
Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium  Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium
Zoe Gilbert
 
Lerman Vvs13 Entity Framework 4 And Wcf
Lerman Vvs13 Entity Framework 4 And WcfLerman Vvs13 Entity Framework 4 And Wcf
Lerman Vvs13 Entity Framework 4 And Wcf
Julie Lerman
 
Python training-course-content
Python training-course-contentPython training-course-content
Python training-course-content
RojaPriya
 
Python training course_content
Python training course_contentPython training course_content
Python training course_content
AmanCSE1
 
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnel
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnelEntity Framework 4 In Microsoft Visual Studio 2010 - ericnel
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnel
ukdpe
 
Zero redeployment with JRebel
Zero redeployment with JRebelZero redeployment with JRebel
Zero redeployment with JRebel
Minh Hoang
 
Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Entity Framework Today (May 2012)
Entity Framework Today (May 2012)
Julie Lerman
 
Ios fundamentals with ObjectiveC
Ios fundamentals with ObjectiveCIos fundamentals with ObjectiveC
Ios fundamentals with ObjectiveC
Madusha Perera
 

Similar to Using Entity Framework's New POCO Features: Part 1, by Julie Lerman (20)

What's New in Entity Framework 4, by Julie Lerman
What's New in Entity Framework 4, by Julie LermanWhat's New in Entity Framework 4, by Julie Lerman
What's New in Entity Framework 4, by Julie Lerman
 
Entity Framework NYC Firestarter
Entity Framework NYC FirestarterEntity Framework NYC Firestarter
Entity Framework NYC Firestarter
 
Spring ActionScript
Spring ActionScriptSpring ActionScript
Spring ActionScript
 
Julie Lerman Agile Entity Framework (March 2010)
Julie Lerman Agile Entity Framework (March 2010)Julie Lerman Agile Entity Framework (March 2010)
Julie Lerman Agile Entity Framework (March 2010)
 
Selenium training-course-content-syllabus-credo systemz
Selenium training-course-content-syllabus-credo systemzSelenium training-course-content-syllabus-credo systemz
Selenium training-course-content-syllabus-credo systemz
 
Persistence Ignorance in Entity Framework 4, Julie Lerman
Persistence Ignorance in Entity Framework 4, Julie LermanPersistence Ignorance in Entity Framework 4, Julie Lerman
Persistence Ignorance in Entity Framework 4, Julie Lerman
 
Persistence Ignorance in Entity Framework 4, Julie Lerman
Persistence Ignorance in Entity Framework 4, Julie LermanPersistence Ignorance in Entity Framework 4, Julie Lerman
Persistence Ignorance in Entity Framework 4, Julie Lerman
 
Selenium training12 1
Selenium training12 1Selenium training12 1
Selenium training12 1
 
Selenium training12 1
Selenium training12 1Selenium training12 1
Selenium training12 1
 
Selenium training-course-content
Selenium training-course-contentSelenium training-course-content
Selenium training-course-content
 
EclipseCon 2009: TmL Tutorial
EclipseCon 2009: TmL TutorialEclipseCon 2009: TmL Tutorial
EclipseCon 2009: TmL Tutorial
 
Selenium webdriver course content rakesh hansalia
Selenium webdriver course content rakesh hansaliaSelenium webdriver course content rakesh hansalia
Selenium webdriver course content rakesh hansalia
 
Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium  Page Object Model and Implementation in Selenium
Page Object Model and Implementation in Selenium
 
Lerman Vvs13 Entity Framework 4 And Wcf
Lerman Vvs13 Entity Framework 4 And WcfLerman Vvs13 Entity Framework 4 And Wcf
Lerman Vvs13 Entity Framework 4 And Wcf
 
Python training-course-content
Python training-course-contentPython training-course-content
Python training-course-content
 
Python training course_content
Python training course_contentPython training course_content
Python training course_content
 
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnel
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnelEntity Framework 4 In Microsoft Visual Studio 2010 - ericnel
Entity Framework 4 In Microsoft Visual Studio 2010 - ericnel
 
Zero redeployment with JRebel
Zero redeployment with JRebelZero redeployment with JRebel
Zero redeployment with JRebel
 
Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Entity Framework Today (May 2012)
Entity Framework Today (May 2012)
 
Ios fundamentals with ObjectiveC
Ios fundamentals with ObjectiveCIos fundamentals with ObjectiveC
Ios fundamentals with ObjectiveC
 

More from Julie Lerman

EF Core in Containerized ASP.NET Core APIs
EF Core in Containerized ASP.NET Core APIsEF Core in Containerized ASP.NET Core APIs
EF Core in Containerized ASP.NET Core APIs
Julie Lerman
 
Domain-Driven Design with Tender Loving Care (DDD with TLC)
Domain-Driven Design with Tender Loving Care (DDD with TLC)Domain-Driven Design with Tender Loving Care (DDD with TLC)
Domain-Driven Design with Tender Loving Care (DDD with TLC)
Julie Lerman
 
What's New in Visual Studio 2017
What's New in Visual Studio 2017What's New in Visual Studio 2017
What's New in Visual Studio 2017
Julie Lerman
 
A Tour of EF Core's (1.1) Most Interesting & Important Features
A Tour of EF Core's (1.1) Most Interesting & Important FeaturesA Tour of EF Core's (1.1) Most Interesting & Important Features
A Tour of EF Core's (1.1) Most Interesting & Important Features
Julie Lerman
 
EF6 or EF Core? How Do I Choose?
EF6 or EF Core? How Do I Choose?EF6 or EF Core? How Do I Choose?
EF6 or EF Core? How Do I Choose?
Julie Lerman
 
Microsoft for developers open source and cross platform
Microsoft for developers  open source and cross platformMicrosoft for developers  open source and cross platform
Microsoft for developers open source and cross platform
Julie Lerman
 
Entity Framework and Domain Driven Design
Entity Framework and Domain Driven DesignEntity Framework and Domain Driven Design
Entity Framework and Domain Driven Design
Julie Lerman
 
RavenDB Overview
RavenDB OverviewRavenDB Overview
RavenDB Overview
Julie Lerman
 
Julie Lerman: Entity Framework FTQs (Frequently Tweeted Questions)
Julie Lerman: Entity Framework FTQs (Frequently Tweeted Questions)Julie Lerman: Entity Framework FTQs (Frequently Tweeted Questions)
Julie Lerman: Entity Framework FTQs (Frequently Tweeted Questions)
Julie Lerman
 
Julie Lerman Entity Framework in the Enterprise (Boston Code Camp March 2013)
Julie Lerman Entity Framework in the Enterprise (Boston Code Camp March 2013)Julie Lerman Entity Framework in the Enterprise (Boston Code Camp March 2013)
Julie Lerman Entity Framework in the Enterprise (Boston Code Camp March 2013)
Julie Lerman
 
Working With Sql Azure from Entity Framework On-Premises (Julia Lerman)
Working With Sql Azure from Entity Framework On-Premises (Julia Lerman)Working With Sql Azure from Entity Framework On-Premises (Julia Lerman)
Working With Sql Azure from Entity Framework On-Premises (Julia Lerman)
Julie Lerman
 
Perspectives on Entity Framework, Julie Lerman
Perspectives on Entity Framework, Julie LermanPerspectives on Entity Framework, Julie Lerman
Perspectives on Entity Framework, Julie Lerman
Julie Lerman
 
Getting Persistence Ignorant with Entity Framework, Julie Lerman
Getting Persistence Ignorant with Entity Framework, Julie LermanGetting Persistence Ignorant with Entity Framework, Julie Lerman
Getting Persistence Ignorant with Entity Framework, Julie Lerman
Julie Lerman
 
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
Julie Lerman
 
Entity Framework 4 and WCF
Entity Framework 4 and WCFEntity Framework 4 and WCF
Entity Framework 4 and WCF
Julie Lerman
 
AgileEntity Framework 4
AgileEntity Framework 4AgileEntity Framework 4
AgileEntity Framework 4
Julie Lerman
 
Lerman Adx303 Entity Framework 4 In Aspnet
Lerman Adx303 Entity Framework 4 In AspnetLerman Adx303 Entity Framework 4 In Aspnet
Lerman Adx303 Entity Framework 4 In Aspnet
Julie Lerman
 
Lerman Vvs14 Ef Tips And Tricks
Lerman Vvs14  Ef Tips And TricksLerman Vvs14  Ef Tips And Tricks
Lerman Vvs14 Ef Tips And Tricks
Julie Lerman
 
Data in the Azure Cloud, by Julie Lerman
Data in the Azure Cloud, by Julie LermanData in the Azure Cloud, by Julie Lerman
Data in the Azure Cloud, by Julie Lerman
Julie Lerman
 

More from Julie Lerman (19)

EF Core in Containerized ASP.NET Core APIs
EF Core in Containerized ASP.NET Core APIsEF Core in Containerized ASP.NET Core APIs
EF Core in Containerized ASP.NET Core APIs
 
Domain-Driven Design with Tender Loving Care (DDD with TLC)
Domain-Driven Design with Tender Loving Care (DDD with TLC)Domain-Driven Design with Tender Loving Care (DDD with TLC)
Domain-Driven Design with Tender Loving Care (DDD with TLC)
 
What's New in Visual Studio 2017
What's New in Visual Studio 2017What's New in Visual Studio 2017
What's New in Visual Studio 2017
 
A Tour of EF Core's (1.1) Most Interesting & Important Features
A Tour of EF Core's (1.1) Most Interesting & Important FeaturesA Tour of EF Core's (1.1) Most Interesting & Important Features
A Tour of EF Core's (1.1) Most Interesting & Important Features
 
EF6 or EF Core? How Do I Choose?
EF6 or EF Core? How Do I Choose?EF6 or EF Core? How Do I Choose?
EF6 or EF Core? How Do I Choose?
 
Microsoft for developers open source and cross platform
Microsoft for developers  open source and cross platformMicrosoft for developers  open source and cross platform
Microsoft for developers open source and cross platform
 
Entity Framework and Domain Driven Design
Entity Framework and Domain Driven DesignEntity Framework and Domain Driven Design
Entity Framework and Domain Driven Design
 
RavenDB Overview
RavenDB OverviewRavenDB Overview
RavenDB Overview
 
Julie Lerman: Entity Framework FTQs (Frequently Tweeted Questions)
Julie Lerman: Entity Framework FTQs (Frequently Tweeted Questions)Julie Lerman: Entity Framework FTQs (Frequently Tweeted Questions)
Julie Lerman: Entity Framework FTQs (Frequently Tweeted Questions)
 
Julie Lerman Entity Framework in the Enterprise (Boston Code Camp March 2013)
Julie Lerman Entity Framework in the Enterprise (Boston Code Camp March 2013)Julie Lerman Entity Framework in the Enterprise (Boston Code Camp March 2013)
Julie Lerman Entity Framework in the Enterprise (Boston Code Camp March 2013)
 
Working With Sql Azure from Entity Framework On-Premises (Julia Lerman)
Working With Sql Azure from Entity Framework On-Premises (Julia Lerman)Working With Sql Azure from Entity Framework On-Premises (Julia Lerman)
Working With Sql Azure from Entity Framework On-Premises (Julia Lerman)
 
Perspectives on Entity Framework, Julie Lerman
Perspectives on Entity Framework, Julie LermanPerspectives on Entity Framework, Julie Lerman
Perspectives on Entity Framework, Julie Lerman
 
Getting Persistence Ignorant with Entity Framework, Julie Lerman
Getting Persistence Ignorant with Entity Framework, Julie LermanGetting Persistence Ignorant with Entity Framework, Julie Lerman
Getting Persistence Ignorant with Entity Framework, Julie Lerman
 
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
 
Entity Framework 4 and WCF
Entity Framework 4 and WCFEntity Framework 4 and WCF
Entity Framework 4 and WCF
 
AgileEntity Framework 4
AgileEntity Framework 4AgileEntity Framework 4
AgileEntity Framework 4
 
Lerman Adx303 Entity Framework 4 In Aspnet
Lerman Adx303 Entity Framework 4 In AspnetLerman Adx303 Entity Framework 4 In Aspnet
Lerman Adx303 Entity Framework 4 In Aspnet
 
Lerman Vvs14 Ef Tips And Tricks
Lerman Vvs14  Ef Tips And TricksLerman Vvs14  Ef Tips And Tricks
Lerman Vvs14 Ef Tips And Tricks
 
Data in the Azure Cloud, by Julie Lerman
Data in the Azure Cloud, by Julie LermanData in the Azure Cloud, by Julie Lerman
Data in the Azure Cloud, by Julie Lerman
 

Recently uploaded

AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
Sunil Jagani
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
FilipTomaszewski5
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
ScyllaDB
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
leebarnesutopia
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
manji sharman06
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
Fwdays
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
christinelarrosa
 

Recently uploaded (20)

AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
 

Using Entity Framework's New POCO Features: Part 1, by Julie Lerman

  • 1. Using POCOS in Entity Framework 4Part 1 Julie Lerman thedatafarm.com/blog jlerman@thedatafarm.com Julia Lerman October 17th 2009, New England Code Camp 12
  • 2. Note to Viewers This is Part 1 of a two part presentation. Part 2 covers testing and other patterns and how EF4 supports them. It was presented by Jamie Phillips. You can find his presentation at http://devblog.petrellyn.com/?p=189 Julia Lerman October 17th 2009, New England Code Camp 12
  • 3. Julie Lerman Julia Lerman October 17th 2009, New England Code Camp 12 website theDataFarm.com blog & twitter theDataFarm.com/blog@julielermanVT book web site LearnEntityFramework.com consultant/mentor Microsoft MVP, INETA Speaker,ASPInsider, MCP, VTdotNET Leader
  • 4. Agenda Standard EntityObject Classes Simple POCO Classes POCO and Proxies Generate POCO Classes with T4 Code-Only Development Julia Lerman October 17th 2009, New England Code Camp 12
  • 5. EF1 & Default EF4 Gen’d Classes CustomTool=EntityModelCodeGenerator Julia Lerman October 17th 2009, New England Code Camp 12
  • 6. POCO: Plain Old CLR Object Define your classes Not bound to other APIs e.g. no inheritance from EntityObject Classes are reusable Simplifies testing and more… Julia Lerman October 17th 2009, New England Code Camp 12
  • 7. How Does EF4 Support POCO? EntityObjects interact with context For POCO, context does all of the work Classes don’t need to know about context Help provided by Special context methods Additional support via proxies Julia Lerman October 17th 2009, New England Code Camp 12
  • 8. Basic POCO Support Turn off code generation from EDMX “Convention” will auto-map classes/entities Julia Lerman October 17th 2009, New England Code Camp 12
  • 9. POCO and Other EF Features Complex Types: Supported Use a class (no structs) to represent the type Lazy Loading Declare property as virtual EF uses a proxy instance at runtime to load Explicit Loading ObjectContext.LoadProperty(myObj,”PropertyName”) ObjectCOntext.LoadProperty(myObj, o=>o.property) Julia Lerman October 17th 2009, New England Code Camp 12
  • 10. Change Tracking Options Snapshot Default change tracking Collected with DetectChanges is called Notification based virtual properties use Proxies Proxies can provide notification to context Julia Lerman October 17th 2009, New England Code Camp 12
  • 11. POCO Classes from Model Julia Lerman October 17th 2009, New England Code Camp 12 T4 Text Template Transformation Toolkit
  • 12. Code-Only Design Part of the Feature CTP No model at all Metadata is inferred from classes Convention by Default EF will rely 100% on presumptions Configuration Follows Tweak configurations to modify behavior Julia Lerman October 17th 2009, New England Code Camp 12
  • 13. Self-Tracking Entities Part of Feature CTP T4 Template to create specialized POCO classes EntityState is tracked by entity Specialized methods that know what to expect from the classes Julia Lerman October 17th 2009, New England Code Camp 12
  • 14. Resources LearnEntityFramework.com/resources blogs.msdn.com/adonet, efdesign, dsimmons, alexj, more... msdn.microsoft.com/data Gateway to whitepapers, forums, documentation Julia Lerman October 17th 2009, New England Code Camp 12
  • 15. Contact Julia Lerman October 17th 2009, New England Code Camp 12 website theDataFarm.com blog & twitter theDataFarm.com/blog@julielermanVT book web site LearnEntityFramework.com consultant/mentor Microsoft MVP, INETA Speaker,ASPInsider, MCP, VTdotNET Leader