SlideShare a Scribd company logo
1 of 19
EF For Cross Platform Apps
@svswaminathan
BDotNet UG Meet, Aug 2016
Swaminathan Vetri
• Senior Engineer @ Target
• Microsoft MVP - Visual Studio &
Development technologies
• Windows/Web/Cross platform mobile
developer
• Blogger, Speaker, Amateur photographer,
Gadget freak
2
Objective
• What is EF Core ?
• Why EF Core ?
• What it offers ?
• EF Core vs EF 6.x
• Demos
What is EF Core ?
• Entity Framework (EF) Core is an object-relational mapper (O/RM)
that enables .NET developers to work with a database using .NET
objects.
• EF Core is a lightweight and extensible version of the popular Entity
Framework data access technology.
Why EF Core ?
• Cross platform i.e., EF Core works on Windows/Mac/Linux
• Lightweight and Composable
• Supports new data stores (relational & non-relational)
• Multiple Database providers
• Optimized around being a simple intuitive O/RM
What it offers?
• Modelling
• Change Tracking
• SaveChanges
• Querying
• Database Schema Management
• Database Providers
• Platforms
Modelling
• Basic modelling
• Built in conventions
• Fluent API
• Data Annotations
• Relationships
• Shadow state properties
• Model validation
• Key Value generation
• Relational : Table mapping
• TPH inheritance
Change Tracking
• Snapshot change tracking
• Notification change tracking
• Accessing tracked state
• Via DbContext.Entry/DbContext.ChangeTracker
• Attaching detached entities/graphs
• Via DbContext.AttachGraph API
Save Changes
• Basic Save
• Optimistic Concurrency
• Async Save changes
• Transactions
• Relational : Batching of statements
Querying
• LINQ Support
• Mixed client/server evaluation
• NoTracking
• Eager loading
• Async Query
• Raw SQL Queries
• Via DbSet.FromSql
Database Schema Management
• Database Creation/Deletion
• Relational Database migration
• Reverse Engineer from Database
Database Providers
• Microsoft SqlServer – connects to SQL server 2008 onwards
• Microsoft SqlServer Compact edition
• IBM data servers
• Sqlite
• InMemory
• Postgres
• MySQL, Oracle (Coming soon)
Platforms
• Full .Net
• Console, WPF, WinForms, ASP.NET 4
• .Net Core
• Asp.Net Core on Windows, Linux and OS X
• UWP
EF Core vs EF 6.x
What’s new in EF Core ?
• Support for UWP, Asp.Net Core, Xamarin (coming soon)
• Database providers like InMemory, Azure Table storage, Redis etc.,
• Reverse engineer model from command line (Scaffold-DbContext)
• Shadow state properties
• Alternate Keys, Key generation at Client
• Mixed client/server evaluation
• Batching of statements (only relational)
What’s NOT available in EF Core ?
• Inheritance (Table per type, Table per concrete class)
• Many to many without join entities
• Complex/value types, Spatial data, graphical visualization of model,
Drag and drop editor, EDMX
• Reverse engineer from database (VS Wizard), Incremental model
update from DB
• Lazy loading, explicit loading, Stored Procedure
• Seed data, Connection resiliency, lifecycle hooks (events, command
interception etc.,)
Demo
Useful links
• https://github.com/aspnet/EntityFramework/wiki/Roadmap
• https://github.com/aspnet/EntityFramework/wiki/Guiding-Principles
• https://docs.efproject.net/en/latest/intro.html
• https://docs.efproject.net/en/latest/efcore-vs-
ef6/features.html#side-by-side-comparison
Thank You
Questions/Feedbacks : swami@wannabeegeek.com | @svswaminathan

More Related Content

What's hot

Migration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET CoreMigration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET CoreMiroslav Popovic
 
Zarafa SummerCamp 2012 - Exchange Web Services on Zarafa
Zarafa SummerCamp 2012 - Exchange Web Services on ZarafaZarafa SummerCamp 2012 - Exchange Web Services on Zarafa
Zarafa SummerCamp 2012 - Exchange Web Services on ZarafaZarafa
 
Life of our small product
Life of our small productLife of our small product
Life of our small productKenji HASUNUMA
 
.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel ZikmundKarel Zikmund
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1asim78
 
Web programming
Web programmingWeb programming
Web programmingIshucs
 
eGrove Systems Review - "Features of Magento 2.0"
eGrove Systems Review - "Features of Magento 2.0"eGrove Systems Review - "Features of Magento 2.0"
eGrove Systems Review - "Features of Magento 2.0"Egrove Systems Corporation
 
KnowItPresentation
KnowItPresentationKnowItPresentation
KnowItPresentationChuan Su
 
Moving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScaleMoving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScalemmoline
 
Accelerating Devops using Corestack
Accelerating Devops using CorestackAccelerating Devops using Corestack
Accelerating Devops using CorestackCoreStack
 
Corestack accelerating devops
Corestack accelerating devopsCorestack accelerating devops
Corestack accelerating devopsAnu Ravindranath
 
The future of cloud programming
The future of cloud programmingThe future of cloud programming
The future of cloud programmingJason Straughan
 
Real World Rails Deployment
Real World Rails DeploymentReal World Rails Deployment
Real World Rails DeploymentAlan Hecht
 

What's hot (20)

Migration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET CoreMigration from ASP.NET MVC to ASP.NET Core
Migration from ASP.NET MVC to ASP.NET Core
 
.Net Fundamentals
.Net Fundamentals.Net Fundamentals
.Net Fundamentals
 
Mule ESB Intro
Mule ESB IntroMule ESB Intro
Mule ESB Intro
 
WordPress Architecture For Beginners
WordPress Architecture For Beginners WordPress Architecture For Beginners
WordPress Architecture For Beginners
 
Zarafa SummerCamp 2012 - Exchange Web Services on Zarafa
Zarafa SummerCamp 2012 - Exchange Web Services on ZarafaZarafa SummerCamp 2012 - Exchange Web Services on Zarafa
Zarafa SummerCamp 2012 - Exchange Web Services on Zarafa
 
Life of our small product
Life of our small productLife of our small product
Life of our small product
 
.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Amsterdam 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
 
FatDB Intro
FatDB IntroFatDB Intro
FatDB Intro
 
Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1Asp.Net 3 5 Part 1
Asp.Net 3 5 Part 1
 
Web programming
Web programmingWeb programming
Web programming
 
Velocity - Edge UG
Velocity - Edge UGVelocity - Edge UG
Velocity - Edge UG
 
Uniqueness of java
Uniqueness of javaUniqueness of java
Uniqueness of java
 
eGrove Systems Review - "Features of Magento 2.0"
eGrove Systems Review - "Features of Magento 2.0"eGrove Systems Review - "Features of Magento 2.0"
eGrove Systems Review - "Features of Magento 2.0"
 
KnowItPresentation
KnowItPresentationKnowItPresentation
KnowItPresentation
 
Moving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScaleMoving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScale
 
Accelerating Devops using Corestack
Accelerating Devops using CorestackAccelerating Devops using Corestack
Accelerating Devops using Corestack
 
Corestack accelerating devops
Corestack accelerating devopsCorestack accelerating devops
Corestack accelerating devops
 
The future of cloud programming
The future of cloud programmingThe future of cloud programming
The future of cloud programming
 
Real World Rails Deployment
Real World Rails DeploymentReal World Rails Deployment
Real World Rails Deployment
 
eGrove Systems - "SOLR" An Apache Product
eGrove Systems - "SOLR" An Apache ProducteGrove Systems - "SOLR" An Apache Product
eGrove Systems - "SOLR" An Apache Product
 

Similar to Entity Framework for Cross platform apps

Introduction to ASP.NET 5
Introduction to ASP.NET 5Introduction to ASP.NET 5
Introduction to ASP.NET 5mbaric
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxKnoldus Inc.
 
WSO2 Intro Webinar - Simplifying Enterprise Integration with Configurable WS...
WSO2 Intro Webinar -  Simplifying Enterprise Integration with Configurable WS...WSO2 Intro Webinar -  Simplifying Enterprise Integration with Configurable WS...
WSO2 Intro Webinar - Simplifying Enterprise Integration with Configurable WS...WSO2
 
.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel ZikmundKarel Zikmund
 
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel ZikmundKarel Zikmund
 
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...Serdar Basegmez
 
[Research] azure ml anatomy of a machine learning service - Sharat Chikkerur
[Research] azure ml  anatomy of a machine learning service - Sharat Chikkerur[Research] azure ml  anatomy of a machine learning service - Sharat Chikkerur
[Research] azure ml anatomy of a machine learning service - Sharat ChikkerurPAPIs.io
 
Entity framework introduction sesion-1
Entity framework introduction   sesion-1Entity framework introduction   sesion-1
Entity framework introduction sesion-1Usama Nada
 
Unboxing ASP.NET Core
Unboxing ASP.NET CoreUnboxing ASP.NET Core
Unboxing ASP.NET CoreKevin Leung
 
Ektron 8.5 Web Content Managemnt
Ektron 8.5 Web Content ManagemntEktron 8.5 Web Content Managemnt
Ektron 8.5 Web Content ManagemntSean_OLeary
 
Alfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European BankAlfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European BankPiergiorgio Lucidi
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC vipin kumar
 
How to grow your own Microservice?
How to grow your own Microservice?How to grow your own Microservice?
How to grow your own Microservice?Dmitry Buzdin
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularMark Leusink
 

Similar to Entity Framework for Cross platform apps (20)

Introduction to ASP.NET 5
Introduction to ASP.NET 5Introduction to ASP.NET 5
Introduction to ASP.NET 5
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
 
WSO2 Intro Webinar - Simplifying Enterprise Integration with Configurable WS...
WSO2 Intro Webinar -  Simplifying Enterprise Integration with Configurable WS...WSO2 Intro Webinar -  Simplifying Enterprise Integration with Configurable WS...
WSO2 Intro Webinar - Simplifying Enterprise Integration with Configurable WS...
 
.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Brno - Challenges of Managing CoreFX repo -- Karel Zikmund
 
ASP.NET 5
ASP.NET 5ASP.NET 5
ASP.NET 5
 
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
.NET MeetUp Prague 2017 - Challenges of Managing CoreFX repo -- Karel Zikmund
 
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
IBM Connect 2017: Your Data In the Major Leagues: A Practical Guide to REST S...
 
[Research] azure ml anatomy of a machine learning service - Sharat Chikkerur
[Research] azure ml  anatomy of a machine learning service - Sharat Chikkerur[Research] azure ml  anatomy of a machine learning service - Sharat Chikkerur
[Research] azure ml anatomy of a machine learning service - Sharat Chikkerur
 
Entity framework introduction sesion-1
Entity framework introduction   sesion-1Entity framework introduction   sesion-1
Entity framework introduction sesion-1
 
70487.pdf
70487.pdf70487.pdf
70487.pdf
 
Unboxing ASP.NET Core
Unboxing ASP.NET CoreUnboxing ASP.NET Core
Unboxing ASP.NET Core
 
Ektron 8.5 Web Content Managemnt
Ektron 8.5 Web Content ManagemntEktron 8.5 Web Content Managemnt
Ektron 8.5 Web Content Managemnt
 
Oracle bi apps training
Oracle bi apps trainingOracle bi apps training
Oracle bi apps training
 
Alfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European BankAlfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European Bank
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
 
05 entity framework
05 entity framework05 entity framework
05 entity framework
 
Sharepoint Deployments
Sharepoint DeploymentsSharepoint Deployments
Sharepoint Deployments
 
How to grow your own Microservice?
How to grow your own Microservice?How to grow your own Microservice?
How to grow your own Microservice?
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
 
Express yourself
Express yourselfExpress yourself
Express yourself
 

More from Swaminathan Vetri

Architecting multi-cloud ready applications
Architecting multi-cloud ready applicationsArchitecting multi-cloud ready applications
Architecting multi-cloud ready applicationsSwaminathan Vetri
 
BDotNet - Microsoft Build 2023 After Party
BDotNet - Microsoft Build 2023 After Party BDotNet - Microsoft Build 2023 After Party
BDotNet - Microsoft Build 2023 After Party Swaminathan Vetri
 
AzureContainerAppswithDotNet_Pune_2022.pptx
AzureContainerAppswithDotNet_Pune_2022.pptxAzureContainerAppswithDotNet_Pune_2022.pptx
AzureContainerAppswithDotNet_Pune_2022.pptxSwaminathan Vetri
 
Microservices and Service Mesh
Microservices and Service MeshMicroservices and Service Mesh
Microservices and Service MeshSwaminathan Vetri
 
Infrastructure automation with .NET
Infrastructure automation with .NETInfrastructure automation with .NET
Infrastructure automation with .NETSwaminathan Vetri
 
Azure infra automation using pulumi
Azure infra automation using pulumiAzure infra automation using pulumi
Azure infra automation using pulumiSwaminathan Vetri
 
Cross platform dotnet development using dotnet core
Cross platform dotnet development using dotnet coreCross platform dotnet development using dotnet core
Cross platform dotnet development using dotnet coreSwaminathan Vetri
 
Unicom DevCon - CI/CD for Asp.net core apps using Docker
Unicom DevCon - CI/CD for Asp.net core apps using DockerUnicom DevCon - CI/CD for Asp.net core apps using Docker
Unicom DevCon - CI/CD for Asp.net core apps using DockerSwaminathan Vetri
 
CI/CD for Asp.net core apps using Docker
CI/CD for Asp.net core apps using DockerCI/CD for Asp.net core apps using Docker
CI/CD for Asp.net core apps using DockerSwaminathan Vetri
 
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruDeploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruSwaminathan Vetri
 
Rapid mobile app development using Ionic framework
Rapid mobile app development using Ionic frameworkRapid mobile app development using Ionic framework
Rapid mobile app development using Ionic frameworkSwaminathan Vetri
 
Xamarin Dev Days - Intro to Xamarin
Xamarin Dev Days - Intro to XamarinXamarin Dev Days - Intro to Xamarin
Xamarin Dev Days - Intro to XamarinSwaminathan Vetri
 

More from Swaminathan Vetri (18)

Architecting multi-cloud ready applications
Architecting multi-cloud ready applicationsArchitecting multi-cloud ready applications
Architecting multi-cloud ready applications
 
BDotNet - Microsoft Build 2023 After Party
BDotNet - Microsoft Build 2023 After Party BDotNet - Microsoft Build 2023 After Party
BDotNet - Microsoft Build 2023 After Party
 
AzureContainerAppswithDotNet_Pune_2022.pptx
AzureContainerAppswithDotNet_Pune_2022.pptxAzureContainerAppswithDotNet_Pune_2022.pptx
AzureContainerAppswithDotNet_Pune_2022.pptx
 
Microservices and Service Mesh
Microservices and Service MeshMicroservices and Service Mesh
Microservices and Service Mesh
 
Infrastructure automation with .NET
Infrastructure automation with .NETInfrastructure automation with .NET
Infrastructure automation with .NET
 
Azure infra automation using pulumi
Azure infra automation using pulumiAzure infra automation using pulumi
Azure infra automation using pulumi
 
CI/CD with GitHub Actions
CI/CD with GitHub ActionsCI/CD with GitHub Actions
CI/CD with GitHub Actions
 
Bye bye WCF, hello gRPC
Bye bye WCF, hello gRPCBye bye WCF, hello gRPC
Bye bye WCF, hello gRPC
 
Building cloud native apps
Building cloud native appsBuilding cloud native apps
Building cloud native apps
 
Azure dev ops
Azure dev opsAzure dev ops
Azure dev ops
 
.Net Standard 2.0
.Net Standard 2.0.Net Standard 2.0
.Net Standard 2.0
 
Cross platform dotnet development using dotnet core
Cross platform dotnet development using dotnet coreCross platform dotnet development using dotnet core
Cross platform dotnet development using dotnet core
 
Unicom DevCon - CI/CD for Asp.net core apps using Docker
Unicom DevCon - CI/CD for Asp.net core apps using DockerUnicom DevCon - CI/CD for Asp.net core apps using Docker
Unicom DevCon - CI/CD for Asp.net core apps using Docker
 
CI/CD for Asp.net core apps using Docker
CI/CD for Asp.net core apps using DockerCI/CD for Asp.net core apps using Docker
CI/CD for Asp.net core apps using Docker
 
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local BengaluruDeploying .net core apps to Docker - dotnetConf Local Bengaluru
Deploying .net core apps to Docker - dotnetConf Local Bengaluru
 
Rapid mobile app development using Ionic framework
Rapid mobile app development using Ionic frameworkRapid mobile app development using Ionic framework
Rapid mobile app development using Ionic framework
 
Xamarin Dev Days - Intro to Xamarin
Xamarin Dev Days - Intro to XamarinXamarin Dev Days - Intro to Xamarin
Xamarin Dev Days - Intro to Xamarin
 
Getting Started with Ionic
Getting Started with IonicGetting Started with Ionic
Getting Started with Ionic
 

Recently uploaded

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 

Recently uploaded (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
+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...
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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, ...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

Entity Framework for Cross platform apps

  • 1. EF For Cross Platform Apps @svswaminathan BDotNet UG Meet, Aug 2016
  • 2. Swaminathan Vetri • Senior Engineer @ Target • Microsoft MVP - Visual Studio & Development technologies • Windows/Web/Cross platform mobile developer • Blogger, Speaker, Amateur photographer, Gadget freak 2
  • 3. Objective • What is EF Core ? • Why EF Core ? • What it offers ? • EF Core vs EF 6.x • Demos
  • 4. What is EF Core ? • Entity Framework (EF) Core is an object-relational mapper (O/RM) that enables .NET developers to work with a database using .NET objects. • EF Core is a lightweight and extensible version of the popular Entity Framework data access technology.
  • 5. Why EF Core ? • Cross platform i.e., EF Core works on Windows/Mac/Linux • Lightweight and Composable • Supports new data stores (relational & non-relational) • Multiple Database providers • Optimized around being a simple intuitive O/RM
  • 6. What it offers? • Modelling • Change Tracking • SaveChanges • Querying • Database Schema Management • Database Providers • Platforms
  • 7. Modelling • Basic modelling • Built in conventions • Fluent API • Data Annotations • Relationships • Shadow state properties • Model validation • Key Value generation • Relational : Table mapping • TPH inheritance
  • 8. Change Tracking • Snapshot change tracking • Notification change tracking • Accessing tracked state • Via DbContext.Entry/DbContext.ChangeTracker • Attaching detached entities/graphs • Via DbContext.AttachGraph API
  • 9. Save Changes • Basic Save • Optimistic Concurrency • Async Save changes • Transactions • Relational : Batching of statements
  • 10. Querying • LINQ Support • Mixed client/server evaluation • NoTracking • Eager loading • Async Query • Raw SQL Queries • Via DbSet.FromSql
  • 11. Database Schema Management • Database Creation/Deletion • Relational Database migration • Reverse Engineer from Database
  • 12. Database Providers • Microsoft SqlServer – connects to SQL server 2008 onwards • Microsoft SqlServer Compact edition • IBM data servers • Sqlite • InMemory • Postgres • MySQL, Oracle (Coming soon)
  • 13. Platforms • Full .Net • Console, WPF, WinForms, ASP.NET 4 • .Net Core • Asp.Net Core on Windows, Linux and OS X • UWP
  • 14. EF Core vs EF 6.x
  • 15. What’s new in EF Core ? • Support for UWP, Asp.Net Core, Xamarin (coming soon) • Database providers like InMemory, Azure Table storage, Redis etc., • Reverse engineer model from command line (Scaffold-DbContext) • Shadow state properties • Alternate Keys, Key generation at Client • Mixed client/server evaluation • Batching of statements (only relational)
  • 16. What’s NOT available in EF Core ? • Inheritance (Table per type, Table per concrete class) • Many to many without join entities • Complex/value types, Spatial data, graphical visualization of model, Drag and drop editor, EDMX • Reverse engineer from database (VS Wizard), Incremental model update from DB • Lazy loading, explicit loading, Stored Procedure • Seed data, Connection resiliency, lifecycle hooks (events, command interception etc.,)
  • 17. Demo
  • 18. Useful links • https://github.com/aspnet/EntityFramework/wiki/Roadmap • https://github.com/aspnet/EntityFramework/wiki/Guiding-Principles • https://docs.efproject.net/en/latest/intro.html • https://docs.efproject.net/en/latest/efcore-vs- ef6/features.html#side-by-side-comparison
  • 19. Thank You Questions/Feedbacks : swami@wannabeegeek.com | @svswaminathan

Editor's Notes

  1. LW & composable – built with CPU and memory in mind, built over composable blocks, pay-per-play, avoid unnecessary abstractions between top level API & DB New data stores – Enables O/RM like features to be applied for non-relational ones, its NOT a replacement for noSQL SDK Optimized for simple O/RM – not a micro O/RM, encourages a specific way of doing things, you can always go back to plain SQL when required
  2. Shadow Properties : These do not exist in the model class, used purely for change tracking
  3. Optimistic Concurrency – protects against overrides from other user’s changes Transactions – to make sure changes are atomic
  4. No tracking – for results that are read only ; doesn’t monitor the changes for the entities
  5. DB creation/deletion APIs to quickly test DB without using migrations
  6. Connection resiliency – automatically retries database commands on failure (more for sql azure kind of scenarios)