SlideShare une entreprise Scribd logo
1  sur  30
Template designed by
Introduction to EF 6.x
Paolo Pialorsi
paolo@pialorsi.com
http://www.pialorsi.com/blog.aspx
brought to you by
Consulente, project manager e trainer dal 1996
Oltre 40 certificazioni Microsoft conseguite
Microsoft Certified Solutions Master – SharePoint
Focalizzato su .NET e SharePoint dal 2002
Autore di 10 libri su XML, SOAP, .NET,
LINQ e SharePoint
• Microsoft SharePoint 2013 Developer Reference, Microsoft Press
• Build Windows 8 Apps with Microsoft Visual C# and
Visual Basic Step by Step, Microsoft Press
• Microsoft SharePoint 2010 Developer Reference, Microsoft Press
Speaker alle principali conferenze IT
Chi sono
Entity Framework 6
Let’s start
Official Object Relational Mapper (O/RM) from Microsoft
Included in .NET Framework
Available via NuGet, as well
Available for free on CodePlex
Source code available, ‘cause it is Open Source since EF6!
Great option for business-level data access solutions
But it is an O/RM … don’t expect great performances …
What’s Entity Framework
Developer workflows
New
Database
Existing
Database
Designer Centric Code Centric
Database First
Reverse engineer model in EF Designer
Classes auto-generated from model
Model First
Create model in EF Designer
Generate database from model
Classes auto-generated from model
Code First
Define classes and mapping in code
EF Power Tools provide reverse engineer
Code First
Define classes and mapping in code
Database created from code
Migrations apply model changes to database
Code First & EF Designer
Asynchronous query and save
Connection resiliency
Code-based configuration
Database command interception/logging
Performance improvements
Code First Only
Custom conventions
Insert, update, & delete stored procedures
What’s new in EF6 (1/4)
Open Source!
http://entityframework.codeplex.com/
• Source code
• Nightly builds
• Issue tracking
• Feature specs
• Design meeting notes
Only EF team has commit rights
Same license
Same support
Same quality
What’s new in EF6 (2/4)
From the EF team
Nested entity types
Improved transaction Support
Multiple contexts per database
DbModelBuilder.HasDefaultSchema
Configurable migrations history table
Creating context with an open connection
Enums, spatial and better performance on .NET 4.0
Default transaction isolation level changed to READ_COMMITTED_SNAPSHOT
What’s new in EF6 (3/4)
From external contributors
Custom migrations operations
Improved warm up time for large models
Pluggable pluralization & singularization service
DbModelBuilder.Configurations.AddFromAssembly
DbSet.AddRange/RemoveRange
What’s new in EF6 (4/4)
Usage scenarios
Let’s play with Entity
Framework 6
You can create database from code
You can define custom conventions to “understand” your code-
based model
Main Goals
Override default conventions
Centralized code/data conventions
Avoid error prone configurations and repetitive tasks
Define company-level patterns
Code first with custom conventions
When you start from the code …
… code changes (often?!)
You can make EF keep track of changes
Defining migration paths from one version to another
Code Migrations will generate migration code for you
Code First Migrations
Code First Migrations
Explicit configuration
Data annotations
Custom conventions
Default conventions
Order of Precedence
In case you want to be independent from the database schema
You can use stored procedures to manage data
Or you can even have already existing databases with stored
procedures
For custom business logic during save actions
If you have to support linked servers
You can now use Code First to map stored procedures to actions
You can leverage custom conventions, as well
Code First Stored Procedures
Code First
Stored Procedures
One of the smartest news of EF6!
To improve performances and scalability
To free-up UI threads
Not to parallelize tasks
Only one async query for each DbContext
Async queries
Async Queries
You can reuse already opened DbConnection instances
Finally! 
Exception “Entity Connection can only be constructed with a closed DbConnection”
passed away …
Connection Resiliency
Automatic retry … very useful with Azure SQL Database
Managing Connections
You have always been able to use TransactionScope instances
around EF
Now you can also share DbTransaction
Not really useful if you have a “clean” architecture
But very useful in any other scenario …
Managed Transactions
Connections
and Transactions
Easy way to see what’s happening in SQL
To see how LINQ is converted to T-SQL
No need of SQL Server Profiler
Useful for debugging
Database Command Logging
Instead of <entityFramework>
Inherit a type from DbConfiguration
Automatic discovery of such a type
Automatic dependency injeciton
Then configure EF by code
For instance configure IDbCommandInterceptor
Code Based Configuration
Code Based
Configuration
Entity Framework Power Tools (Beta 4)
Allow to design a code first model
Allow to reverse engineer an existing DB
Procuding the “Code First” code … “after” 
Reverse Engineering Existing DB
Final Thoughts
Shall I use EF in real
business solutions?
You should consider it …
And make a decision based on
• Performances
• Scalability
• Time to market
• Shared knowledge
• Total cost of management
Shall I use EF in real business solutions?
Don’t expect the very best performances you can ever achieve in your life
You have to pay the price for the infrastructure
But you have services back from the infrastructure
If you need super-fast solutions
Use custom ADO.NET code
And pay for it
• Implementation, maintenance, tooling, etc.
If you need “classic” performances
Give EF6 a chance …
Decouple code layer and be ready for any changes in the future
Moreover
Grazie a tutti per la partecipazione
Riceverete il link per il download a slide e demo via email nei
prossimi giorni
Per contattarmi
paolo@devleap.com
Grazie

Contenu connexe

Tendances

Advanced application architecture
Advanced application architectureAdvanced application architecture
Advanced application architectureMatthias Noback
 
Spring integration with the Java DSL
Spring integration with the Java DSLSpring integration with the Java DSL
Spring integration with the Java DSLBen Wilcock
 
Asp.net c# mvc Training-Day-5 of Day-9
Asp.net c# mvc Training-Day-5 of Day-9Asp.net c# mvc Training-Day-5 of Day-9
Asp.net c# mvc Training-Day-5 of Day-9AHM Pervej Kabir
 
Getting Started with Flex and PHP
Getting Started with Flex and PHPGetting Started with Flex and PHP
Getting Started with Flex and PHPRyan Stewart
 
Entity Framework and Domain Driven Design
Entity Framework and Domain Driven DesignEntity Framework and Domain Driven Design
Entity Framework and Domain Driven DesignJulie Lerman
 
Lerman Vvs14 Ef Tips And Tricks
Lerman Vvs14  Ef Tips And TricksLerman Vvs14  Ef Tips And Tricks
Lerman Vvs14 Ef Tips And TricksJulie Lerman
 
Visual Studio 2012 - Tipps & Tricks
Visual Studio 2012 - Tipps & TricksVisual Studio 2012 - Tipps & Tricks
Visual Studio 2012 - Tipps & TricksPatric Boscolo
 
Spring Integration: from XML to Java DSL
Spring Integration: from XML to Java DSLSpring Integration: from XML to Java DSL
Spring Integration: from XML to Java DSLAndrey Krivtsun
 
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)Matthias Noback
 
why c++11?
why c++11?why c++11?
why c++11?idrajeev
 
Implementing DDD with C#
Implementing DDD with C#Implementing DDD with C#
Implementing DDD with C#Pascal Laurin
 
What's New in ReSharper 9?
What's New in ReSharper 9?What's New in ReSharper 9?
What's New in ReSharper 9?citizenmatt
 
Onion Architecture and the Blog
Onion Architecture and the BlogOnion Architecture and the Blog
Onion Architecture and the Blogbarryosull
 
Dependency injection presentation
Dependency injection presentationDependency injection presentation
Dependency injection presentationAhasanul Kalam Akib
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented ProgrammingRajesh Ganesan
 
Api chaining(tm)
Api chaining(tm)Api chaining(tm)
Api chaining(tm)Owen Rubel
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code firstConfiz
 
Using ADO.NET Entity Framework in Domain Driven Design: A Pattern Approach
Using ADO.NET Entity Framework in Domain Driven Design: A Pattern ApproachUsing ADO.NET Entity Framework in Domain Driven Design: A Pattern Approach
Using ADO.NET Entity Framework in Domain Driven Design: A Pattern ApproachHoan Phuc
 

Tendances (20)

Advanced application architecture
Advanced application architectureAdvanced application architecture
Advanced application architecture
 
Spring integration with the Java DSL
Spring integration with the Java DSLSpring integration with the Java DSL
Spring integration with the Java DSL
 
Asp.net c# mvc Training-Day-5 of Day-9
Asp.net c# mvc Training-Day-5 of Day-9Asp.net c# mvc Training-Day-5 of Day-9
Asp.net c# mvc Training-Day-5 of Day-9
 
Getting Started with Flex and PHP
Getting Started with Flex and PHPGetting Started with Flex and PHP
Getting Started with Flex and PHP
 
Entity Framework and Domain Driven Design
Entity Framework and Domain Driven DesignEntity Framework and Domain Driven Design
Entity Framework and Domain Driven Design
 
Lerman Vvs14 Ef Tips And Tricks
Lerman Vvs14  Ef Tips And TricksLerman Vvs14  Ef Tips And Tricks
Lerman Vvs14 Ef Tips And Tricks
 
Visual Studio 2012 - Tipps & Tricks
Visual Studio 2012 - Tipps & TricksVisual Studio 2012 - Tipps & Tricks
Visual Studio 2012 - Tipps & Tricks
 
Spring Integration: from XML to Java DSL
Spring Integration: from XML to Java DSLSpring Integration: from XML to Java DSL
Spring Integration: from XML to Java DSL
 
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
 
why c++11?
why c++11?why c++11?
why c++11?
 
Implementing DDD with C#
Implementing DDD with C#Implementing DDD with C#
Implementing DDD with C#
 
What's New in ReSharper 9?
What's New in ReSharper 9?What's New in ReSharper 9?
What's New in ReSharper 9?
 
Onion Architecture and the Blog
Onion Architecture and the BlogOnion Architecture and the Blog
Onion Architecture and the Blog
 
Dependency injection presentation
Dependency injection presentationDependency injection presentation
Dependency injection presentation
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programming
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
 
Api chaining(tm)
Api chaining(tm)Api chaining(tm)
Api chaining(tm)
 
Zend Framework
Zend FrameworkZend Framework
Zend Framework
 
Entity framework code first
Entity framework code firstEntity framework code first
Entity framework code first
 
Using ADO.NET Entity Framework in Domain Driven Design: A Pattern Approach
Using ADO.NET Entity Framework in Domain Driven Design: A Pattern ApproachUsing ADO.NET Entity Framework in Domain Driven Design: A Pattern Approach
Using ADO.NET Entity Framework in Domain Driven Design: A Pattern Approach
 

En vedette

DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...
DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...
DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...DotNetCampus
 
Ag04 gestire gruppi di lavoro, team multipli e progetti con visual studio alm
Ag04   gestire gruppi di lavoro, team multipli e progetti con visual studio almAg04   gestire gruppi di lavoro, team multipli e progetti con visual studio alm
Ag04 gestire gruppi di lavoro, team multipli e progetti con visual studio almDotNetCampus
 
Gam04 introduzione a-netduino_final
Gam04   introduzione a-netduino_finalGam04   introduzione a-netduino_final
Gam04 introduzione a-netduino_finalDotNetCampus
 
Signal r to the-max
Signal r to the-maxSignal r to the-max
Signal r to the-maxDotNetCampus
 
AZURE WEBSITE DEEPDIVE
AZURE WEBSITE DEEPDIVEAZURE WEBSITE DEEPDIVE
AZURE WEBSITE DEEPDIVEDotNetCampus
 
Ds03 data analysis
Ds03   data analysisDs03   data analysis
Ds03 data analysisDotNetCampus
 
CONTINUOUS INTEGRATION CON SQL SERVER
CONTINUOUS INTEGRATION CON SQL SERVERCONTINUOUS INTEGRATION CON SQL SERVER
CONTINUOUS INTEGRATION CON SQL SERVERDotNetCampus
 
Win03 design windows store apps
Win03   design windows store appsWin03   design windows store apps
Win03 design windows store appsDotNetCampus
 
Be05 introduction to sql azure
Be05   introduction to sql azureBe05   introduction to sql azure
Be05 introduction to sql azureDotNetCampus
 
Javascript task automation
Javascript task automationJavascript task automation
Javascript task automationDotNetCampus
 
Windows iot barone
Windows iot baroneWindows iot barone
Windows iot baroneDotNetCampus
 
70-483: PROGRAMMING IN C#
70-483: PROGRAMMING IN C#70-483: PROGRAMMING IN C#
70-483: PROGRAMMING IN C#DotNetCampus
 
Dnc2015 azure-microservizi-vforusso
Dnc2015 azure-microservizi-vforussoDnc2015 azure-microservizi-vforusso
Dnc2015 azure-microservizi-vforussoDotNetCampus
 
70-534: ARCHITECTING MICROSOFT AZURE SOLUTIONS
70-534: ARCHITECTING MICROSOFT AZURE SOLUTIONS70-534: ARCHITECTING MICROSOFT AZURE SOLUTIONS
70-534: ARCHITECTING MICROSOFT AZURE SOLUTIONSDotNetCampus
 

En vedette (18)

DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...
DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...
DSTORIE DALLA TRINCEA: TEAM FOUNDATION SERVER IN CASI LIMITE E NON SOLO...
 
Formulacion inorganica
Formulacion inorganicaFormulacion inorganica
Formulacion inorganica
 
Ag04 gestire gruppi di lavoro, team multipli e progetti con visual studio alm
Ag04   gestire gruppi di lavoro, team multipli e progetti con visual studio almAg04   gestire gruppi di lavoro, team multipli e progetti con visual studio alm
Ag04 gestire gruppi di lavoro, team multipli e progetti con visual studio alm
 
Gam04 introduzione a-netduino_final
Gam04   introduzione a-netduino_finalGam04   introduzione a-netduino_final
Gam04 introduzione a-netduino_final
 
Signal r to the-max
Signal r to the-maxSignal r to the-max
Signal r to the-max
 
Ds01 data science
Ds01   data scienceDs01   data science
Ds01 data science
 
AZURE WEBSITE DEEPDIVE
AZURE WEBSITE DEEPDIVEAZURE WEBSITE DEEPDIVE
AZURE WEBSITE DEEPDIVE
 
Ds03 data analysis
Ds03   data analysisDs03   data analysis
Ds03 data analysis
 
Newsletter
NewsletterNewsletter
Newsletter
 
CONTINUOUS INTEGRATION CON SQL SERVER
CONTINUOUS INTEGRATION CON SQL SERVERCONTINUOUS INTEGRATION CON SQL SERVER
CONTINUOUS INTEGRATION CON SQL SERVER
 
Win03 design windows store apps
Win03   design windows store appsWin03   design windows store apps
Win03 design windows store apps
 
Be05 introduction to sql azure
Be05   introduction to sql azureBe05   introduction to sql azure
Be05 introduction to sql azure
 
Javascript task automation
Javascript task automationJavascript task automation
Javascript task automation
 
Pigmento pb y cd
Pigmento pb y cdPigmento pb y cd
Pigmento pb y cd
 
Windows iot barone
Windows iot baroneWindows iot barone
Windows iot barone
 
70-483: PROGRAMMING IN C#
70-483: PROGRAMMING IN C#70-483: PROGRAMMING IN C#
70-483: PROGRAMMING IN C#
 
Dnc2015 azure-microservizi-vforusso
Dnc2015 azure-microservizi-vforussoDnc2015 azure-microservizi-vforusso
Dnc2015 azure-microservizi-vforusso
 
70-534: ARCHITECTING MICROSOFT AZURE SOLUTIONS
70-534: ARCHITECTING MICROSOFT AZURE SOLUTIONS70-534: ARCHITECTING MICROSOFT AZURE SOLUTIONS
70-534: ARCHITECTING MICROSOFT AZURE SOLUTIONS
 

Similaire à Be04 introduction to ef 6.0

Elements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code FirstElements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code FirstEnea Gabriel
 
VSTO + LOB Apps
VSTO + LOB AppsVSTO + LOB Apps
VSTO + LOB AppsJoao Livio
 
Taking SharePoint 2010 Offline - European Best Practices Conference
Taking SharePoint 2010 Offline - European Best Practices ConferenceTaking SharePoint 2010 Offline - European Best Practices Conference
Taking SharePoint 2010 Offline - European Best Practices ConferenceGus Fraser
 
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
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Bruce Johnson
 
Entity Framework Core 1.0
Entity Framework Core 1.0Entity Framework Core 1.0
Entity Framework Core 1.0Senthil Kumar
 
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
 
The ultimate cheat sheet on .net core, .net framework, and .net standard
The ultimate cheat sheet on .net core, .net framework, and .net standardThe ultimate cheat sheet on .net core, .net framework, and .net standard
The ultimate cheat sheet on .net core, .net framework, and .net standardConcetto Labs
 
VSTO + LOB Apps Information Matters
VSTO + LOB Apps Information MattersVSTO + LOB Apps Information Matters
VSTO + LOB Apps Information MattersComunidade NetPonto
 
Domain Modeling & Full-Stack Web Development F#
Domain Modeling & Full-Stack Web Development F#Domain Modeling & Full-Stack Web Development F#
Domain Modeling & Full-Stack Web Development F#Kevin Avignon
 
13 - Panorama Necto 14 building models - visualization & data discovery solu...
13  - Panorama Necto 14 building models - visualization & data discovery solu...13  - Panorama Necto 14 building models - visualization & data discovery solu...
13 - Panorama Necto 14 building models - visualization & data discovery solu...Panorama Software
 
Php Frameworks
Php FrameworksPhp Frameworks
Php FrameworksRyan Davis
 
JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...
JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...
JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...John Head
 
Flexible delivery options
Flexible delivery options Flexible delivery options
Flexible delivery options Micro Focus
 
ILUG 2007 - Notes and Office Integration
ILUG 2007 - Notes and Office IntegrationILUG 2007 - Notes and Office Integration
ILUG 2007 - Notes and Office IntegrationJohn Head
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arpGary Pedretti
 

Similaire à Be04 introduction to ef 6.0 (20)

Elements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code FirstElements of DDD with ASP.NET MVC & Entity Framework Code First
Elements of DDD with ASP.NET MVC & Entity Framework Code First
 
Entity framework
Entity frameworkEntity framework
Entity framework
 
VSTO + LOB Apps
VSTO + LOB AppsVSTO + LOB Apps
VSTO + LOB Apps
 
Taking SharePoint 2010 Offline - European Best Practices Conference
Taking SharePoint 2010 Offline - European Best Practices ConferenceTaking SharePoint 2010 Offline - European Best Practices Conference
Taking SharePoint 2010 Offline - European Best Practices Conference
 
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)
 
Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0Overview of VS2010 and .NET 4.0
Overview of VS2010 and .NET 4.0
 
Entity Framework Core 1.0
Entity Framework Core 1.0Entity Framework Core 1.0
Entity Framework Core 1.0
 
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)
 
05 entity framework
05 entity framework05 entity framework
05 entity framework
 
The ultimate cheat sheet on .net core, .net framework, and .net standard
The ultimate cheat sheet on .net core, .net framework, and .net standardThe ultimate cheat sheet on .net core, .net framework, and .net standard
The ultimate cheat sheet on .net core, .net framework, and .net standard
 
VSTO + LOB Apps Information Matters
VSTO + LOB Apps Information MattersVSTO + LOB Apps Information Matters
VSTO + LOB Apps Information Matters
 
Domain Modeling & Full-Stack Web Development F#
Domain Modeling & Full-Stack Web Development F#Domain Modeling & Full-Stack Web Development F#
Domain Modeling & Full-Stack Web Development F#
 
13 - Panorama Necto 14 building models - visualization & data discovery solu...
13  - Panorama Necto 14 building models - visualization & data discovery solu...13  - Panorama Necto 14 building models - visualization & data discovery solu...
13 - Panorama Necto 14 building models - visualization & data discovery solu...
 
Php Frameworks
Php FrameworksPhp Frameworks
Php Frameworks
 
Bp205
Bp205Bp205
Bp205
 
JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...
JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...
JMP201 Introduction to IBM Lotus Notes and IBM Lotus Domino Integration with ...
 
Flexible delivery options
Flexible delivery options Flexible delivery options
Flexible delivery options
 
Ef code first
Ef code firstEf code first
Ef code first
 
ILUG 2007 - Notes and Office Integration
ILUG 2007 - Notes and Office IntegrationILUG 2007 - Notes and Office Integration
ILUG 2007 - Notes and Office Integration
 
Onion Architecture with S#arp
Onion Architecture with S#arpOnion Architecture with S#arp
Onion Architecture with S#arp
 

Plus de DotNetCampus

ARCHITETTURA DI UN'APPLICAZIONE SCALABILE
ARCHITETTURA DI UN'APPLICAZIONE SCALABILEARCHITETTURA DI UN'APPLICAZIONE SCALABILE
ARCHITETTURA DI UN'APPLICAZIONE SCALABILEDotNetCampus
 
MICROSOFT E IL MONDO IOT
MICROSOFT E IL MONDO IOTMICROSOFT E IL MONDO IOT
MICROSOFT E IL MONDO IOTDotNetCampus
 
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#DotNetCampus
 
TUTTO SU VISUAL STUDIO ALM 2015
TUTTO SU VISUAL STUDIO ALM 2015TUTTO SU VISUAL STUDIO ALM 2015
TUTTO SU VISUAL STUDIO ALM 2015DotNetCampus
 
PREDICT THE FUTURE , MACHINE LEARNING & BIG DATA
PREDICT THE FUTURE , MACHINE LEARNING & BIG DATAPREDICT THE FUTURE , MACHINE LEARNING & BIG DATA
PREDICT THE FUTURE , MACHINE LEARNING & BIG DATADotNetCampus
 
DESKTOP AND CLIENT VIRTUALIZATION: NEW WORKSTYLES WITH MICROSOFT VDI
DESKTOP AND CLIENT VIRTUALIZATION: NEW WORKSTYLES WITH MICROSOFT VDIDESKTOP AND CLIENT VIRTUALIZATION: NEW WORKSTYLES WITH MICROSOFT VDI
DESKTOP AND CLIENT VIRTUALIZATION: NEW WORKSTYLES WITH MICROSOFT VDIDotNetCampus
 
FROM ON-PREMISE TO THE HYBRID CLOUD WITH MICROSOFT AZURE
FROM ON-PREMISE TO THE HYBRID CLOUD WITH MICROSOFT AZUREFROM ON-PREMISE TO THE HYBRID CLOUD WITH MICROSOFT AZURE
FROM ON-PREMISE TO THE HYBRID CLOUD WITH MICROSOFT AZUREDotNetCampus
 
SHAREPOINT 2016 - WHAT'S NEW
SHAREPOINT 2016 - WHAT'S NEWSHAREPOINT 2016 - WHAT'S NEW
SHAREPOINT 2016 - WHAT'S NEWDotNetCampus
 
COSTRUISCI IL TUO DEVICE
COSTRUISCI IL TUO DEVICECOSTRUISCI IL TUO DEVICE
COSTRUISCI IL TUO DEVICEDotNetCampus
 
SVILUPPARE PER MICROSOFT BAND
SVILUPPARE PER MICROSOFT BANDSVILUPPARE PER MICROSOFT BAND
SVILUPPARE PER MICROSOFT BANDDotNetCampus
 
INTERFACCE GRAFICHE CON UNITY3D 4.6: IL GIOCO NON BASTA!
INTERFACCE GRAFICHE CON UNITY3D 4.6: IL GIOCO NON BASTA!INTERFACCE GRAFICHE CON UNITY3D 4.6: IL GIOCO NON BASTA!
INTERFACCE GRAFICHE CON UNITY3D 4.6: IL GIOCO NON BASTA!DotNetCampus
 
WINDOWS PHONE APPS IN C++
WINDOWS PHONE APPS IN C++WINDOWS PHONE APPS IN C++
WINDOWS PHONE APPS IN C++DotNetCampus
 
AZURE NOTIFICATION HUB
AZURE NOTIFICATION HUBAZURE NOTIFICATION HUB
AZURE NOTIFICATION HUBDotNetCampus
 
SFRUTTARE I MICROSOFT AZURE MOBILE SERVICES CON XAMARIN.FORMS
SFRUTTARE I MICROSOFT AZURE MOBILE SERVICES CON XAMARIN.FORMSSFRUTTARE I MICROSOFT AZURE MOBILE SERVICES CON XAMARIN.FORMS
SFRUTTARE I MICROSOFT AZURE MOBILE SERVICES CON XAMARIN.FORMSDotNetCampus
 
UNIVERSAL APP IN TUTTE LE SALSE: PHONE, TABLET, PC, XBOX E IOT
UNIVERSAL APP IN TUTTE LE SALSE: PHONE, TABLET, PC, XBOX E IOTUNIVERSAL APP IN TUTTE LE SALSE: PHONE, TABLET, PC, XBOX E IOT
UNIVERSAL APP IN TUTTE LE SALSE: PHONE, TABLET, PC, XBOX E IOTDotNetCampus
 
SFRUTTARE CORTANA E LE SPEECH API NELLE NOSTRE APP
SFRUTTARE CORTANA E LE SPEECH API NELLE NOSTRE APPSFRUTTARE CORTANA E LE SPEECH API NELLE NOSTRE APP
SFRUTTARE CORTANA E LE SPEECH API NELLE NOSTRE APPDotNetCampus
 
APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!
APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!
APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!DotNetCampus
 
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!DotNetCampus
 
SVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURE
SVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURESVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURE
SVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZUREDotNetCampus
 

Plus de DotNetCampus (20)

ARCHITETTURA DI UN'APPLICAZIONE SCALABILE
ARCHITETTURA DI UN'APPLICAZIONE SCALABILEARCHITETTURA DI UN'APPLICAZIONE SCALABILE
ARCHITETTURA DI UN'APPLICAZIONE SCALABILE
 
MICROSOFT E IL MONDO IOT
MICROSOFT E IL MONDO IOTMICROSOFT E IL MONDO IOT
MICROSOFT E IL MONDO IOT
 
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
70-485: ADVANCED OF DEVELOPING WINDOWS STORE APPS USING C#
 
TUTTO SU VISUAL STUDIO ALM 2015
TUTTO SU VISUAL STUDIO ALM 2015TUTTO SU VISUAL STUDIO ALM 2015
TUTTO SU VISUAL STUDIO ALM 2015
 
PREDICT THE FUTURE , MACHINE LEARNING & BIG DATA
PREDICT THE FUTURE , MACHINE LEARNING & BIG DATAPREDICT THE FUTURE , MACHINE LEARNING & BIG DATA
PREDICT THE FUTURE , MACHINE LEARNING & BIG DATA
 
DESKTOP AND CLIENT VIRTUALIZATION: NEW WORKSTYLES WITH MICROSOFT VDI
DESKTOP AND CLIENT VIRTUALIZATION: NEW WORKSTYLES WITH MICROSOFT VDIDESKTOP AND CLIENT VIRTUALIZATION: NEW WORKSTYLES WITH MICROSOFT VDI
DESKTOP AND CLIENT VIRTUALIZATION: NEW WORKSTYLES WITH MICROSOFT VDI
 
FROM ON-PREMISE TO THE HYBRID CLOUD WITH MICROSOFT AZURE
FROM ON-PREMISE TO THE HYBRID CLOUD WITH MICROSOFT AZUREFROM ON-PREMISE TO THE HYBRID CLOUD WITH MICROSOFT AZURE
FROM ON-PREMISE TO THE HYBRID CLOUD WITH MICROSOFT AZURE
 
SHAREPOINT 2016 - WHAT'S NEW
SHAREPOINT 2016 - WHAT'S NEWSHAREPOINT 2016 - WHAT'S NEW
SHAREPOINT 2016 - WHAT'S NEW
 
COSTRUISCI IL TUO DEVICE
COSTRUISCI IL TUO DEVICECOSTRUISCI IL TUO DEVICE
COSTRUISCI IL TUO DEVICE
 
SVILUPPARE PER MICROSOFT BAND
SVILUPPARE PER MICROSOFT BANDSVILUPPARE PER MICROSOFT BAND
SVILUPPARE PER MICROSOFT BAND
 
INTERFACCE GRAFICHE CON UNITY3D 4.6: IL GIOCO NON BASTA!
INTERFACCE GRAFICHE CON UNITY3D 4.6: IL GIOCO NON BASTA!INTERFACCE GRAFICHE CON UNITY3D 4.6: IL GIOCO NON BASTA!
INTERFACCE GRAFICHE CON UNITY3D 4.6: IL GIOCO NON BASTA!
 
WINDOWS PHONE APPS IN C++
WINDOWS PHONE APPS IN C++WINDOWS PHONE APPS IN C++
WINDOWS PHONE APPS IN C++
 
AZURE NOTIFICATION HUB
AZURE NOTIFICATION HUBAZURE NOTIFICATION HUB
AZURE NOTIFICATION HUB
 
SFRUTTARE I MICROSOFT AZURE MOBILE SERVICES CON XAMARIN.FORMS
SFRUTTARE I MICROSOFT AZURE MOBILE SERVICES CON XAMARIN.FORMSSFRUTTARE I MICROSOFT AZURE MOBILE SERVICES CON XAMARIN.FORMS
SFRUTTARE I MICROSOFT AZURE MOBILE SERVICES CON XAMARIN.FORMS
 
INTRO TO XAMARIN
INTRO TO XAMARININTRO TO XAMARIN
INTRO TO XAMARIN
 
UNIVERSAL APP IN TUTTE LE SALSE: PHONE, TABLET, PC, XBOX E IOT
UNIVERSAL APP IN TUTTE LE SALSE: PHONE, TABLET, PC, XBOX E IOTUNIVERSAL APP IN TUTTE LE SALSE: PHONE, TABLET, PC, XBOX E IOT
UNIVERSAL APP IN TUTTE LE SALSE: PHONE, TABLET, PC, XBOX E IOT
 
SFRUTTARE CORTANA E LE SPEECH API NELLE NOSTRE APP
SFRUTTARE CORTANA E LE SPEECH API NELLE NOSTRE APPSFRUTTARE CORTANA E LE SPEECH API NELLE NOSTRE APP
SFRUTTARE CORTANA E LE SPEECH API NELLE NOSTRE APP
 
APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!
APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!
APPSTUDIO: DA ZERO ALLO STORE IN 50 MINUTI!
 
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
SIGNALR TO-THE-MAX: VERSO IL WEB ED OLTRE!
 
SVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURE
SVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURESVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURE
SVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURE
 

Dernier

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
🐬 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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Dernier (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Be04 introduction to ef 6.0

  • 1. Template designed by Introduction to EF 6.x Paolo Pialorsi paolo@pialorsi.com http://www.pialorsi.com/blog.aspx
  • 3. Consulente, project manager e trainer dal 1996 Oltre 40 certificazioni Microsoft conseguite Microsoft Certified Solutions Master – SharePoint Focalizzato su .NET e SharePoint dal 2002 Autore di 10 libri su XML, SOAP, .NET, LINQ e SharePoint • Microsoft SharePoint 2013 Developer Reference, Microsoft Press • Build Windows 8 Apps with Microsoft Visual C# and Visual Basic Step by Step, Microsoft Press • Microsoft SharePoint 2010 Developer Reference, Microsoft Press Speaker alle principali conferenze IT Chi sono
  • 5. Official Object Relational Mapper (O/RM) from Microsoft Included in .NET Framework Available via NuGet, as well Available for free on CodePlex Source code available, ‘cause it is Open Source since EF6! Great option for business-level data access solutions But it is an O/RM … don’t expect great performances … What’s Entity Framework
  • 6. Developer workflows New Database Existing Database Designer Centric Code Centric Database First Reverse engineer model in EF Designer Classes auto-generated from model Model First Create model in EF Designer Generate database from model Classes auto-generated from model Code First Define classes and mapping in code EF Power Tools provide reverse engineer Code First Define classes and mapping in code Database created from code Migrations apply model changes to database
  • 7. Code First & EF Designer Asynchronous query and save Connection resiliency Code-based configuration Database command interception/logging Performance improvements Code First Only Custom conventions Insert, update, & delete stored procedures What’s new in EF6 (1/4)
  • 8. Open Source! http://entityframework.codeplex.com/ • Source code • Nightly builds • Issue tracking • Feature specs • Design meeting notes Only EF team has commit rights Same license Same support Same quality What’s new in EF6 (2/4)
  • 9. From the EF team Nested entity types Improved transaction Support Multiple contexts per database DbModelBuilder.HasDefaultSchema Configurable migrations history table Creating context with an open connection Enums, spatial and better performance on .NET 4.0 Default transaction isolation level changed to READ_COMMITTED_SNAPSHOT What’s new in EF6 (3/4)
  • 10. From external contributors Custom migrations operations Improved warm up time for large models Pluggable pluralization & singularization service DbModelBuilder.Configurations.AddFromAssembly DbSet.AddRange/RemoveRange What’s new in EF6 (4/4)
  • 11. Usage scenarios Let’s play with Entity Framework 6
  • 12. You can create database from code You can define custom conventions to “understand” your code- based model Main Goals Override default conventions Centralized code/data conventions Avoid error prone configurations and repetitive tasks Define company-level patterns Code first with custom conventions
  • 13. When you start from the code … … code changes (often?!) You can make EF keep track of changes Defining migration paths from one version to another Code Migrations will generate migration code for you Code First Migrations
  • 15. Explicit configuration Data annotations Custom conventions Default conventions Order of Precedence
  • 16. In case you want to be independent from the database schema You can use stored procedures to manage data Or you can even have already existing databases with stored procedures For custom business logic during save actions If you have to support linked servers You can now use Code First to map stored procedures to actions You can leverage custom conventions, as well Code First Stored Procedures
  • 18. One of the smartest news of EF6! To improve performances and scalability To free-up UI threads Not to parallelize tasks Only one async query for each DbContext Async queries
  • 20. You can reuse already opened DbConnection instances Finally!  Exception “Entity Connection can only be constructed with a closed DbConnection” passed away … Connection Resiliency Automatic retry … very useful with Azure SQL Database Managing Connections
  • 21. You have always been able to use TransactionScope instances around EF Now you can also share DbTransaction Not really useful if you have a “clean” architecture But very useful in any other scenario … Managed Transactions
  • 23. Easy way to see what’s happening in SQL To see how LINQ is converted to T-SQL No need of SQL Server Profiler Useful for debugging Database Command Logging
  • 24. Instead of <entityFramework> Inherit a type from DbConfiguration Automatic discovery of such a type Automatic dependency injeciton Then configure EF by code For instance configure IDbCommandInterceptor Code Based Configuration
  • 26. Entity Framework Power Tools (Beta 4) Allow to design a code first model Allow to reverse engineer an existing DB Procuding the “Code First” code … “after”  Reverse Engineering Existing DB
  • 27. Final Thoughts Shall I use EF in real business solutions?
  • 28. You should consider it … And make a decision based on • Performances • Scalability • Time to market • Shared knowledge • Total cost of management Shall I use EF in real business solutions?
  • 29. Don’t expect the very best performances you can ever achieve in your life You have to pay the price for the infrastructure But you have services back from the infrastructure If you need super-fast solutions Use custom ADO.NET code And pay for it • Implementation, maintenance, tooling, etc. If you need “classic” performances Give EF6 a chance … Decouple code layer and be ready for any changes in the future Moreover
  • 30. Grazie a tutti per la partecipazione Riceverete il link per il download a slide e demo via email nei prossimi giorni Per contattarmi paolo@devleap.com Grazie