SlideShare a Scribd company logo
1 of 10
Entity Framework 
Session #1 : introduction 
By: Usama Nada. 
Lead Software Engineer
ORM (Object/Relational Mapping) 
• ORM: a programming technique for converting data 
between incompatible type systems in relational 
databases and object-oriented programming 
languages.
why do we need it? 
• ORM is a tool for storing data from business objects (Entities, Model Objects, 
POCOs) to relational database like MS SQL Server in an automated way 
without much programming. 
• Automates standard CRUD operation (Create, Read, Update & Delete) so 
developer doesn’t need to write it manually. 
• Hide the SQL away from your logic code. Leads to easily support more 
database engines. 
• Less Code, Less Effort, Productivity, simplicity, abstracting your data layer, 
and enables you to more focus on app business
ORMs for .Net 
• NHibernate (open source). 1st release 2007 . Ported from Java Hibernate which started 2001 
• LBLGen Pro (commercial). 1st release 2003 
• EntitySpaces (open source). 1st release 2006 
• Telerik Data Access (free) 
• DevExpress XPO (commercial) 
• Micro ORMs (less features but optimized for performance): 
• PetaPOCO, Dapper, OrmLite 
• Entity Framework by Microsoft (open source). 1st release 2008 with .NetFramework 3.5 SP1.
Some of ORMs Common Features 
• Entity Mapping and Model Creation 
• Visual Studio Integration 
• LINQ support 
• Call Stored Procedures, User Defined Functions, and SQL Table-Valued Functions 
• Database Engine Support (SQL Server, Oracle, MySQL, SQLite, SQL CE, …) using ADO.Net Data Providers. 
• Support Transactions 
• First Level Caching (L1 Caching), and Second Level Caching (L2 Caching). 
• Tracking Changes 
• Concurrency Control (Optimistic, Pessimistic) 
• Lazy Loading 
• Batch operations Bulk Insert / Update / Delete
Entity Framework 
• Open source object-relational mapping (ORM) framework for ADO.NET, 
part of .NET Framework. 
• Enables developers to work with relational database and deal with data as 
objects and properties. Using the EF, developers write queries using LINQ, 
then retrieve and manipulate data as strongly typed objects
Entity Framework Basic Terminology 
• Entities: they represent the individual instances of the objects (such 
as customer, orders) to which the information pertains. 
• Entity Data Model (EDM): xml file where the logical schema and its mapping with 
the physical schema is represented (Generates Context class and Entity classes). 
• Context Class: Responsible for Querying: It can be useful in querying the database. 
It converts database values into entity objects and vica versa. Change Tracking: It 
keeps track of changes occurred in the entities after it has been querying from the 
database. Persisting Data: Saving, Updating 
• EDM Designer: where you build and manage your EDM
DEMO
Next Session(s) 
• EF architecture deeper look. 
• Stored Procedures Object Mapping 
• Optimistic Concurrency Example using RowVersion. 
• Repository and Unit of Work design patterns and how to utilize both on EF 
• Very Useful EF Extensions 
• Demo Application (featuring grid with searching, paging, sorting, caching, basic 
reporting rdlc, and JavaScript charts)
Resources 
• Entity Framework Project: https://entityframework.codeplex.com/ 
• Terminology: http://msdn.microsoft.com/en-us/library/bb387161.aspx 
• Tutorial: http://www.entityframeworktutorial.net/ 
• Documentation: http://msdn.microsoft.com/en-us/data/ee712907.aspx 
• EF6 Features: http://msdn.microsoft.com/en-us/magazine/dn532202.aspx

More Related Content

What's hot

Introducing Entity Framework 4.0
Introducing Entity Framework 4.0Introducing Entity Framework 4.0
Introducing Entity Framework 4.0Bishoy Demian
 
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
 
Entity Framework Database and Code First
Entity Framework Database and Code FirstEntity Framework Database and Code First
Entity Framework Database and Code FirstJames Johnson
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework OverviewEyal Vardi
 
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
 
Introducing the Entity Framework
Introducing the Entity FrameworkIntroducing the Entity Framework
Introducing the Entity FrameworkLearnNowOnline
 
Entity Framework
Entity FrameworkEntity Framework
Entity Frameworkvrluckyin
 
Introduction to React by Ebowe Blessing
Introduction to React by Ebowe BlessingIntroduction to React by Ebowe Blessing
Introduction to React by Ebowe BlessingBlessing Ebowe
 
Microsoft SQL Server 2008
Microsoft SQL Server 2008Microsoft SQL Server 2008
Microsoft SQL Server 2008Hossein Zahed
 
Microsoft Data Access Technologies
Microsoft Data Access TechnologiesMicrosoft Data Access Technologies
Microsoft Data Access TechnologiesDavid Chou
 
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource GroupLINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource GroupShahzad
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overviewukdpe
 
Building nTier Applications with Entity Framework Services
Building nTier Applications with Entity Framework ServicesBuilding nTier Applications with Entity Framework Services
Building nTier Applications with Entity Framework ServicesDavid McCarter
 
Entity Framework Core 2.1: Simple, Powerful Data Access for .NET
Entity Framework Core 2.1: Simple, Powerful Data Access for .NETEntity Framework Core 2.1: Simple, Powerful Data Access for .NET
Entity Framework Core 2.1: Simple, Powerful Data Access for .NETMicrosoft Tech Community
 
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
 
Java enterprise development framework
Java enterprise development frameworkJava enterprise development framework
Java enterprise development frameworkPavel Suvorov
 
JIRA Development
JIRA DevelopmentJIRA Development
JIRA DevelopmentSperasoft
 

What's hot (20)

Introducing Entity Framework 4.0
Introducing Entity Framework 4.0Introducing Entity Framework 4.0
Introducing 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)
 
Ef code first
Ef code firstEf code first
Ef code first
 
Entity Framework Database and Code First
Entity Framework Database and Code FirstEntity Framework Database and Code First
Entity Framework Database and Code First
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overview
 
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)
 
Introducing the Entity Framework
Introducing the Entity FrameworkIntroducing the Entity Framework
Introducing the Entity Framework
 
Entity Framework
Entity FrameworkEntity Framework
Entity Framework
 
Introduction to React by Ebowe Blessing
Introduction to React by Ebowe BlessingIntroduction to React by Ebowe Blessing
Introduction to React by Ebowe Blessing
 
Microsoft SQL Server 2008
Microsoft SQL Server 2008Microsoft SQL Server 2008
Microsoft SQL Server 2008
 
Microsoft Data Access Technologies
Microsoft Data Access TechnologiesMicrosoft Data Access Technologies
Microsoft Data Access Technologies
 
Linq
LinqLinq
Linq
 
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource GroupLINQ 2 SQL Presentation To Palmchip  And Trg, Technology Resource Group
LINQ 2 SQL Presentation To Palmchip And Trg, Technology Resource Group
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overview
 
Building nTier Applications with Entity Framework Services
Building nTier Applications with Entity Framework ServicesBuilding nTier Applications with Entity Framework Services
Building nTier Applications with Entity Framework Services
 
Entity Framework Core 2.1: Simple, Powerful Data Access for .NET
Entity Framework Core 2.1: Simple, Powerful Data Access for .NETEntity Framework Core 2.1: Simple, Powerful Data Access for .NET
Entity Framework Core 2.1: Simple, Powerful Data Access for .NET
 
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)
 
Java enterprise development framework
Java enterprise development frameworkJava enterprise development framework
Java enterprise development framework
 
What is JDBC
What is JDBCWhat is JDBC
What is JDBC
 
JIRA Development
JIRA DevelopmentJIRA Development
JIRA Development
 

Viewers also liked

Building High Performance Websites - Session-1
Building High Performance Websites - Session-1Building High Performance Websites - Session-1
Building High Performance Websites - Session-1Usama Nada
 
Dapper & Dapper.SimpleCRUD
Dapper & Dapper.SimpleCRUDDapper & Dapper.SimpleCRUD
Dapper & Dapper.SimpleCRUDBlank Chen
 
.NET Database Toolkit
.NET Database Toolkit.NET Database Toolkit
.NET Database Toolkitwlscaudill
 
Object Relational Mapping with Dapper (Micro ORM)
Object Relational Mapping with Dapper (Micro ORM)Object Relational Mapping with Dapper (Micro ORM)
Object Relational Mapping with Dapper (Micro ORM)Muhammad Umar
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Beat Signer
 

Viewers also liked (7)

Building High Performance Websites - Session-1
Building High Performance Websites - Session-1Building High Performance Websites - Session-1
Building High Performance Websites - Session-1
 
Dapper & Dapper.SimpleCRUD
Dapper & Dapper.SimpleCRUDDapper & Dapper.SimpleCRUD
Dapper & Dapper.SimpleCRUD
 
Dapper
DapperDapper
Dapper
 
.NET Database Toolkit
.NET Database Toolkit.NET Database Toolkit
.NET Database Toolkit
 
Object Relational Mapping with Dapper (Micro ORM)
Object Relational Mapping with Dapper (Micro ORM)Object Relational Mapping with Dapper (Micro ORM)
Object Relational Mapping with Dapper (Micro ORM)
 
Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)Software Development Life Cycle (SDLC)
Software Development Life Cycle (SDLC)
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
 

Similar to Entity framework introduction sesion-1

Domain oriented development
Domain oriented developmentDomain oriented development
Domain oriented developmentrajmundr
 
Entity Framework Core 1.0
Entity Framework Core 1.0Entity Framework Core 1.0
Entity Framework Core 1.0Senthil Kumar
 
Entity Framework V1 and V2
Entity Framework V1 and V2Entity Framework V1 and V2
Entity Framework V1 and V2ukdpe
 
Entity Framework v1 and v2
Entity Framework v1 and v2Entity Framework v1 and v2
Entity Framework v1 and v2Eric Nelson
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework OverviewEric Nelson
 
Strudel: Framework for Transaction Performance Analyses on SQL/NoSQL Systems
Strudel: Framework for Transaction Performance Analyses on SQL/NoSQL SystemsStrudel: Framework for Transaction Performance Analyses on SQL/NoSQL Systems
Strudel: Framework for Transaction Performance Analyses on SQL/NoSQL Systemstatemura
 
【Unite 2018 Tokyo】C# Job SystemとECS(Entity Component System)解説
【Unite 2018 Tokyo】C# Job SystemとECS(Entity Component System)解説【Unite 2018 Tokyo】C# Job SystemとECS(Entity Component System)解説
【Unite 2018 Tokyo】C# Job SystemとECS(Entity Component System)解説Unity Technologies Japan K.K.
 
Top 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous DatabaseTop 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous DatabaseSandesh Rao
 
AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)Igor Talevski
 
Introduction to SalesForce
Introduction to SalesForceIntroduction to SalesForce
Introduction to SalesForceSujit Kumar
 
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - IPune-Cocoa: Core data - I
Pune-Cocoa: Core data - IPrashant Rane
 
Free Hibernate Tutorial | VirtualNuggets
Free Hibernate Tutorial  | VirtualNuggetsFree Hibernate Tutorial  | VirtualNuggets
Free Hibernate Tutorial | VirtualNuggetsVirtual Nuggets
 
CISSP Prep: Ch 9. Software Development Security
CISSP Prep: Ch 9. Software Development SecurityCISSP Prep: Ch 9. Software Development Security
CISSP Prep: Ch 9. Software Development SecuritySam Bowne
 

Similar to Entity framework introduction sesion-1 (20)

Domain oriented development
Domain oriented developmentDomain oriented development
Domain oriented development
 
Entity Framework Core 1.0
Entity Framework Core 1.0Entity Framework Core 1.0
Entity Framework Core 1.0
 
Entity framework
Entity frameworkEntity framework
Entity framework
 
Ef overview
Ef overviewEf overview
Ef overview
 
Entity Framework V1 and V2
Entity Framework V1 and V2Entity Framework V1 and V2
Entity Framework V1 and V2
 
Entity Framework v1 and v2
Entity Framework v1 and v2Entity Framework v1 and v2
Entity Framework v1 and v2
 
Entity Framework
Entity FrameworkEntity Framework
Entity Framework
 
Entity Framework Overview
Entity Framework OverviewEntity Framework Overview
Entity Framework Overview
 
Strudel: Framework for Transaction Performance Analyses on SQL/NoSQL Systems
Strudel: Framework for Transaction Performance Analyses on SQL/NoSQL SystemsStrudel: Framework for Transaction Performance Analyses on SQL/NoSQL Systems
Strudel: Framework for Transaction Performance Analyses on SQL/NoSQL Systems
 
【Unite 2018 Tokyo】C# Job SystemとECS(Entity Component System)解説
【Unite 2018 Tokyo】C# Job SystemとECS(Entity Component System)解説【Unite 2018 Tokyo】C# Job SystemとECS(Entity Component System)解説
【Unite 2018 Tokyo】C# Job SystemとECS(Entity Component System)解説
 
Getting started with entity framework
Getting started with entity framework Getting started with entity framework
Getting started with entity framework
 
Top 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous DatabaseTop 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous Database
 
AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)
 
70487.pdf
70487.pdf70487.pdf
70487.pdf
 
Introduction to SalesForce
Introduction to SalesForceIntroduction to SalesForce
Introduction to SalesForce
 
Hibernate tutorial
Hibernate tutorialHibernate tutorial
Hibernate tutorial
 
ORM Methodology
ORM MethodologyORM Methodology
ORM Methodology
 
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - IPune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
 
Free Hibernate Tutorial | VirtualNuggets
Free Hibernate Tutorial  | VirtualNuggetsFree Hibernate Tutorial  | VirtualNuggets
Free Hibernate Tutorial | VirtualNuggets
 
CISSP Prep: Ch 9. Software Development Security
CISSP Prep: Ch 9. Software Development SecurityCISSP Prep: Ch 9. Software Development Security
CISSP Prep: Ch 9. Software Development Security
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
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
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 

Entity framework introduction sesion-1

  • 1. Entity Framework Session #1 : introduction By: Usama Nada. Lead Software Engineer
  • 2. ORM (Object/Relational Mapping) • ORM: a programming technique for converting data between incompatible type systems in relational databases and object-oriented programming languages.
  • 3. why do we need it? • ORM is a tool for storing data from business objects (Entities, Model Objects, POCOs) to relational database like MS SQL Server in an automated way without much programming. • Automates standard CRUD operation (Create, Read, Update & Delete) so developer doesn’t need to write it manually. • Hide the SQL away from your logic code. Leads to easily support more database engines. • Less Code, Less Effort, Productivity, simplicity, abstracting your data layer, and enables you to more focus on app business
  • 4. ORMs for .Net • NHibernate (open source). 1st release 2007 . Ported from Java Hibernate which started 2001 • LBLGen Pro (commercial). 1st release 2003 • EntitySpaces (open source). 1st release 2006 • Telerik Data Access (free) • DevExpress XPO (commercial) • Micro ORMs (less features but optimized for performance): • PetaPOCO, Dapper, OrmLite • Entity Framework by Microsoft (open source). 1st release 2008 with .NetFramework 3.5 SP1.
  • 5. Some of ORMs Common Features • Entity Mapping and Model Creation • Visual Studio Integration • LINQ support • Call Stored Procedures, User Defined Functions, and SQL Table-Valued Functions • Database Engine Support (SQL Server, Oracle, MySQL, SQLite, SQL CE, …) using ADO.Net Data Providers. • Support Transactions • First Level Caching (L1 Caching), and Second Level Caching (L2 Caching). • Tracking Changes • Concurrency Control (Optimistic, Pessimistic) • Lazy Loading • Batch operations Bulk Insert / Update / Delete
  • 6. Entity Framework • Open source object-relational mapping (ORM) framework for ADO.NET, part of .NET Framework. • Enables developers to work with relational database and deal with data as objects and properties. Using the EF, developers write queries using LINQ, then retrieve and manipulate data as strongly typed objects
  • 7. Entity Framework Basic Terminology • Entities: they represent the individual instances of the objects (such as customer, orders) to which the information pertains. • Entity Data Model (EDM): xml file where the logical schema and its mapping with the physical schema is represented (Generates Context class and Entity classes). • Context Class: Responsible for Querying: It can be useful in querying the database. It converts database values into entity objects and vica versa. Change Tracking: It keeps track of changes occurred in the entities after it has been querying from the database. Persisting Data: Saving, Updating • EDM Designer: where you build and manage your EDM
  • 9. Next Session(s) • EF architecture deeper look. • Stored Procedures Object Mapping • Optimistic Concurrency Example using RowVersion. • Repository and Unit of Work design patterns and how to utilize both on EF • Very Useful EF Extensions • Demo Application (featuring grid with searching, paging, sorting, caching, basic reporting rdlc, and JavaScript charts)
  • 10. Resources • Entity Framework Project: https://entityframework.codeplex.com/ • Terminology: http://msdn.microsoft.com/en-us/library/bb387161.aspx • Tutorial: http://www.entityframeworktutorial.net/ • Documentation: http://msdn.microsoft.com/en-us/data/ee712907.aspx • EF6 Features: http://msdn.microsoft.com/en-us/magazine/dn532202.aspx

Editor's Notes

  1. DbContext