https://www.sqlsaturday.com/viewsession.aspx?sat=355&sessionid=25373
Entity Framework è la tecnologia (open-source) di accesso ai dati consigliata e coordinata da Microsoft, in dettaglio è un ORM (object-relational mapper) nato dall'esigenza di volere accedere a dati relazionali sfruttando la pura programmazione ad oggetti, eliminando quasi completamente la necessità di dovere scrivere codice specifico per l'accesso ai dati (T-SQL). In particolare in questa sessione vedremo come sfruttare Entity Framework ricavandone il massimo dell'elasticità, partendo dal codice (Code-First) e non da un designer (Model-First), inoltre vedremo come sia possibile accedere anche ad un database esistente, sempre in code-first. Indipendentemente che siate nuovi, o abbiate già sguazzato in altre tecnologie ORM, vi mostrerò quanto velocemente sia possibile iniziare a lavorare con EF6 e aumentare la vostra produttività durante la creazione di applicazione .NET data-centriche.
Sessione "Advanced ef code first 5.0" tenuta da Luca Cestola all'evento EF@Work di DomusDotNet (http://www.domusdotnet.org/eventi/efatwork.aspx) del 5 Luglio 2013
Sessione "Advanced ef code first 5.0" tenuta da Luca Cestola all'evento EF@Work di DomusDotNet (http://www.domusdotnet.org/eventi/efatwork.aspx) del 5 Luglio 2013
Feedback Loops...to infinity, and beyond!Rui Carvalho
Agile. Agile is not a noun we can quantify but an adjective. Why on earth are most people trying to buy some ’agile’ then ? Why are people trying to sell that they are ’doing’ agile?
Maybe it's time to remember the core values of software development, and among them, feedback is a central one. Let’s try to refine our ability to understand feedback and see how it can help to produce better software
MVC 6 / ASP.NET 5 represent a fundamental shift for the ASP.NET framework. More than simply the next version, this is a complete rewrite and a break from the old System.Web that was central to all previous versions of ASP.NET. The result is a lighter-weight framework that supports cross platform development and deployment. In this session we explore some of the new building blocks in MVC 6 including Tag Helpers and View Components.
Learn Entity Framework in a day with Code First, Model First and Database FirstJibran Rasheed Khan
Learn Entity Framework in a day with Code First, Model First and Database First
•Introduction to Entity Framework (EF)
•Architecture
•What’s new!
•Different approaches to work with (Code first, Database first and model first)
•Choosing right work model
•Pictorial Tour to each model
•Features & Advantages
•Question & Answer
for any help and understanding feel free to contact
thank you
Improve your web dev workflow in Visual StudioDavid Paquette
The variety and sheer number of libraries used to create the average web application today can be difficult to manage. Add to that cross browser support and constantly changing HTML, CSS and JavaScript specifications: Life as a web developer can be stressful. Luckily, Visual Studio has you covered with support for modern web developer tools. There are options for everyone, whether you prefer a purely IDE based solution like Web Essentials or an extensible node.js based solution like Gulp and Bower.
Learn about how object-relational mapping works to provide data access and understand what the Entity Framework is and how it can provide robust data access services to applications.
ORM технологии в .NET (Nhibernate, Linq To SQL, Entity Framework)Pavel Tsukanov
Расскажу зачем они вообще нужны. Пройдемся по технологиям и промоем им косточки. Рассмотрим достоинства и недостатки, а также где и когда лучше всего применять ту или иную ORM.
This is an introduction session about Microsoft Entity Framework 4.0 (year 2011), since then the technology has evolved and matured in many ways and some of the limitations had been mitigated.
Feedback Loops...to infinity, and beyond!Rui Carvalho
Agile. Agile is not a noun we can quantify but an adjective. Why on earth are most people trying to buy some ’agile’ then ? Why are people trying to sell that they are ’doing’ agile?
Maybe it's time to remember the core values of software development, and among them, feedback is a central one. Let’s try to refine our ability to understand feedback and see how it can help to produce better software
MVC 6 / ASP.NET 5 represent a fundamental shift for the ASP.NET framework. More than simply the next version, this is a complete rewrite and a break from the old System.Web that was central to all previous versions of ASP.NET. The result is a lighter-weight framework that supports cross platform development and deployment. In this session we explore some of the new building blocks in MVC 6 including Tag Helpers and View Components.
Learn Entity Framework in a day with Code First, Model First and Database FirstJibran Rasheed Khan
Learn Entity Framework in a day with Code First, Model First and Database First
•Introduction to Entity Framework (EF)
•Architecture
•What’s new!
•Different approaches to work with (Code first, Database first and model first)
•Choosing right work model
•Pictorial Tour to each model
•Features & Advantages
•Question & Answer
for any help and understanding feel free to contact
thank you
Improve your web dev workflow in Visual StudioDavid Paquette
The variety and sheer number of libraries used to create the average web application today can be difficult to manage. Add to that cross browser support and constantly changing HTML, CSS and JavaScript specifications: Life as a web developer can be stressful. Luckily, Visual Studio has you covered with support for modern web developer tools. There are options for everyone, whether you prefer a purely IDE based solution like Web Essentials or an extensible node.js based solution like Gulp and Bower.
Learn about how object-relational mapping works to provide data access and understand what the Entity Framework is and how it can provide robust data access services to applications.
ORM технологии в .NET (Nhibernate, Linq To SQL, Entity Framework)Pavel Tsukanov
Расскажу зачем они вообще нужны. Пройдемся по технологиям и промоем им косточки. Рассмотрим достоинства и недостатки, а также где и когда лучше всего применять ту или иную ORM.
This is an introduction session about Microsoft Entity Framework 4.0 (year 2011), since then the technology has evolved and matured in many ways and some of the limitations had been mitigated.
Asp.Net MVC 3 - Il Model View Controller secondo MicrosoftStefano Benedetti
Il pattern architetturale MVC (Model View Controller) favorisce la manutenzione delle applicazioni web tramite una architettura elegante ed una chiara ed esplicita separazione delle competenze, l'impiego dei più diffusi pattern di software engineering, il controllo completo dell'HTML generato e degli URL, la testabilità ed estendibilità.
In questa sessione vedremo le novità principali di Asp.Net MVC in versione 3.
La sessione è stata tenuta a SMAU Business Bologna il 9 giugno 2011
Programmazione web libera dai frameworkFrancesca1980
Un nuovo progetto web parte quasi sempre con la domanda "che framework usiamo?" Diamo per scontato che non si possa sviluppare per il web senza fare uso di framework. Ma che succederebbe se decidessimo di sviluppare senza framework? Potremmo ottenere maggiore controllo e qualità, meno rischi e meno costi. Serve "solo" la volontà di imparare a programmare bene. Darò alcune dritte con Java e TDD.
Accelera lo sviluppo con il web framework! Componenti a supporto dello svilup...Tsuneo Kurihara
Framework sì o framework no?
Direi proprio di sì! In questa presentazione faccio una panoramica di quello che è un web framework, cosa offre e quali sono i vantaggi.
MongoDB User Group Padova - Overviews iniziale su MongoDBStefano Dindo
MongoDB è un database non relazionale, orientato ai documenti. Classificato come un database di tipo NoSQL, MongoDB si allontana dalla struttura tradizionale basata su tabelle dei database relazionali in favore di documenti in stile JSON con schema dinamico (MongoDB chiama il formato BSON), rendendo l'integrazione di dati di alcuni tipi di applicazioni più facile e veloce.
Lo scopo del MongoDB User Group Padova è quello di condividere esperienze sulla tecnologia MongoDB.
Questa presentazione, usata durante il primo evento dello User Group, è stata usata per introdurre i partecipanti sulle procedure di installazione ed i concetti di base su MongoDB.
Una rassegna sul framework per lo sviluppo in Javascript jQuery ed alcuni suoi plugin sviluppati da Microsoft: Template e Datalink
http://www.pasqualepuzio.it
Come portare il profiler di symfony2 in drupal8Luca Lusso
Molti progetti PHP open source hanno adottato Symfony2 come base per la loro prossima versione, tra questi c'è anche il CMS Drupal (http://drupal.org). In questo talk vedremo come scrivere un modulo per Drupal8 in modo da sfruttare il più possibile il suo nuovo motore Symfony2, dall'integrazione con il service container alla gestione degli eventi, dal routing a Twig. Verrà usato come esempio il modulo webprofiler (http://drupal.org/project/webprofiler) per dimostrare come un bundle per Symfony2 possa essere trasformato in un modulo per Drupal8 e integrato facilmente nel sistema.
by Davide Cerbo e Stefano Linguerri
La programmazione web sta facendo passi da gigante e oggi l’utente si aspetta che l’esperienza di utilizzo si avvicini sempre di più a quella a cui è abituato nei classici applicativi desktop. Il mondo degli sviluppatori ha risposto inventanto una nuova sigla: RIA, cioè Rich Internet Application. Google non è stata a guardare e ha fornito la sua risposta a questa esigenza donando alla community Google Web Toolkit. Questo nuovo framework permette di sviluppare in Java tutta l’interfaccia utente per poi ottenere un codice javascript che funzionerà su qualsiasi browser web senza l’installazione di plugin aggiuntivi. In questa presentazione vedremo:
* perchè sviluppare applicazioni RIA
* perchè usare GWT
* come GWT utilizza AJAX per comunicare con il server
* le ottimizzazione che avremo utilizzando GWT
* come uscire dal browser con Google Gear e Mozilla Prism
* e non solo…
Go reactive with Realm and Xamarin Forms - Andrea Ceroni - Codemotion Rome 2018Codemotion
In this talk I would like to share my experience of using this new mobile database with great potential. We will see which are the major differences compared to SQLite and what makes Realm very fast so as to be called "in realtime". We develop a realtime multiplatform collaborative app starting from scratch, using the latest features introduced by Xamarin Forms to improve the responsiveness. Your viewmodels and bindings for sure will thank you! :-)
4. #sqlsatParma
#sqlsat355November 22nd, 2014
Speaker info
Microsoft Visual C# MVP
Blogs:
[ITA] http://blogs.dotnethell.it/regulator/
[ENG] http://dennymichael.net/
Community/Forum:
http://www.dotnethell.it
Twitter: @dennymic
More details on:
http://about.me/micdenny/
5. #sqlsatParma
#sqlsat355November 22nd, 2014
Agenda
Concetti ORM
Scegliere tra designer o codice
Entity Framework Code-First in azione
Evolvere il database: Code-First Migrations
Importare un database esistente
Strumenti di Logging e Profiling
What’s Next
Q&A
6. #sqlsatParma
#sqlsat355November 22nd, 2014
Visual Studio Community 2013
Include tutte le funzionalità di Visual Studio Professional 2013
Sviluppatori indipendenti per applicazioni sia free che a pagamento, studenti,
collaboratori open source, e organizzazioni con team fino a 5 persone
7. #sqlsatParma
#sqlsat355November 22nd, 2014
Concetti ORM
Integrazione tra OOP e RDBMS
Persistenza dei dati con interfaccia
unificata
Interfaccia orientata agli oggetti
Astrazione sul tipo di database utilizzato
Sviluppo nel vostro linguaggio (C# )
Riduzione di codice ripetitivo CRUD
Codice più «pulito» e ben strutturato
8. #sqlsatParma
#sqlsat355November 22nd, 2014
Entity Framework
Implementazione ORM open-source per
ADO.NET
Librerie su NuGet
Lazy-Load
Caching (object, query plan, metadata)
Gestione della Concorrenza
Repository Pattern (DbSet)
Unit of Work (DbContext)
http://msdn.microsoft.com/data/ee712907
10. #sqlsatParma
#sqlsat355November 22nd, 2014
Database
Esistente
Database First
• Creazione modello partendo da un
DB esistente (Reverse Engineering)
• Classi auto-generate dal modello
Code First (Database Esistente)
• Definizione classi da codice
• Strumenti per l’auto-generazione delle
classi partendo da un DB esistente
(Reverse Engineering)
Nuovo
Database
Model First
• Creazione modello da designer
• Database creato dal modello
• Classi auto-generate dal modello
Code First (Nuovo Database)
• Definizione classi da codice
• Database creato dal modello
• Possibilità di evolvere il database
utilizzando le Migrations
Designer o Codice
11. #sqlsatParma
#sqlsat355November 22nd, 2014
EF Code-First in azione
Modellazione dati
Convenzioni
Operazioni basilari (CRUD)
Query LINQ
Personalizzazioni con Data Annotation
Personalizzazioni con Fluent API
12. #sqlsatParma
#sqlsat355November 22nd, 2014
Modellazione dati
POCO class
public class Blog
{
public int BlogId { get; set; }
public string Name { get; set; }
public virtual ICollection<Post> Posts { get; set; }
}
public class Post
{
public int PostId { get; set; }
public string Title { get; set; }
public string Content { get; set; }
public int BlogId { get; set; }
public virtual Blog Blog { get; set; }
}
13. #sqlsatParma
#sqlsat355November 22nd, 2014
Modellazione dati
Le proprietà di navigazione definiscono il tipo di relazione
tra le entità in base al tipo di ritorno:
Riferimento, per relazioni uno a uno
Collezione, per relazioni uno a molti
Includere sempre anche la foreign
key sulla classe che rappresenta
l’oggetto dipendente
Virtual abilita il Lazy Loading
vedi: http://msdn.microsoft.com/data/jj574232
public class Blog
{
public int BlogId { get; set; }
public string Name { get; set; }
public virtual ICollection<Post> Posts
{ get; set; }
}
public class Post
{
public int PostId { get; set; }
public string Title { get; set; }
public string Content { get; set; }
public int BlogId { get; set; }
public virtual Blog Blog { get; set; }
}
14. #sqlsatParma
#sqlsat355November 22nd, 2014
DbContext e DbSet
Responsabile dell’interazione con il database
In grado di creare il database dal modello classi
Gestisce e popola gli oggetti entità
Rileva le modifiche (change tracking)
Persiste le informazioni a database
Implementa la Unit of Work (SaveChanges)
Espone proprietà DbSet (Repository Pattern) che
rappresentano collezioni di specifiche entità
public class BloggingContext : DbContext
{
public DbSet<Blog> Blogs { get; set; }
public DbSet<Post> Posts { get; set; }
}
17. #sqlsatParma
#sqlsat355November 22nd, 2014
Convenzioni: Chiave Primaria
Nome proprietà "Id" (non case sentitive)
Nome classe seguito da "Id", es.: "UserId"
Identity Column se il tipo è numerico o GUID
public class Blog
{
public int BlogId { get; set; }
public string Name { get; set; }
public virtual ICollection<Post> Posts { get; set; }
}
18. #sqlsatParma
#sqlsat355November 22nd, 2014
Basate sulle proprietà di navigazione
Foreign key deve avere lo stesso tipo dato della chiave
primaria e nome:
1. «nome proprietà di navigazione»«nome proprietà chiave primaria» es.:
BlogBlogId
2. «nome classe principale»«nome proprietà chiave primaria» es.:
BlogBlogId
3. «nome proprietà chiave primaria»
es.: BlogId
Non è case sensitive
FK nullable = relazione opzionale
Cascade delete se FK != nullable
public class Post
{
public int PostId { get; set; }
public string Title { get; set; }
public string Content { get; set; }
public int BlogId { get; set; }
public Blog Blog { get; set; }
}
public class Blog
{
public int BlogId { get; set; }
}
Convenzioni: Relazioni
19. #sqlsatParma
#sqlsat355November 22nd, 2014
Convenzioni: Connection String
DbContext() = Code-First + IConnectionFactory:
Nome db: «namespace».«nome classe dbcontext>
Server: SQL Express oppure LocalDb, se entrambi sono
installati, viene utilizzato SQL Express
DbContext("MyDatabase") = Code-First +
IConnectionFactory:
Nome db: MyDatabase
Server: SQL Express o LocalDb
Se nell’app.config esiste una connection string con lo stesso
nome, allora viene usata quella e bypassato il factory
DbContext("name=MyDatabase") = Code-First:
Forza la dichiarazione della connection string su app.config
21. #sqlsatParma
#sqlsat355November 22nd, 2014
Convenzioni
IdKeyDiscoveryConvention
Rileva le proprietà per la chiave primaria
PluralizingTableNameConvention
Nome tabella = plurale nome classe
PluralizingEntitySetNameConvention
Proprietà di navigazione = plurale nome tipo dato
DecimalPropertyConvention
Setta la precision e la scale (18,2) per le proprietà decimali
Tanti tanti altri...
Vedi: System.Data.Entity.ModelConfiguration.Conventions
22. #sqlsatParma
#sqlsat355November 22nd, 2014
Operazioni basilari (CRUD)
using (var db = new BloggingContext())
{
var blog = new Blog();
blog.Name = "Il mio primo blog";
db.Blogs.Add(blog);
db.SaveChanges();
}
using (var db = new BloggingContext())
{
var blog = db.Blogs.Find(1);
Console.WriteLine(blog.Name);
}
using (var db = new BloggingContext())
{
var blog = db.Blogs.Find(1);
blog.Name = "Nome modificato!!";
db.SaveChanges();
}
using (var db = new BloggingContext())
{
var blog = db.Blogs.Find(1);
db.Blogs.Remove(blog);
db.SaveChanges();
}
24. #sqlsatParma
#sqlsat355November 22nd, 2014
LINQ Query
Lambda Expression
Query LINQ: Filtrare
using (var db = new BloggingContext())
{
var results = from post in db.Posts
where post.Title.Contains("trovami")
select post;
foreach (var result in results)
Console.WriteLine(result.Title);
}
using (var db = new BloggingContext())
{
var results = db.Posts
.Where(post => post.Title.Contains("trovami"));
foreach (var result in results)
Console.WriteLine(result.Title);
}
SELECT
[Extent1].[PostId] AS [PostId],
[Extent1].[Title] AS [Title],
[Extent1].[Content] AS [Content],
[Extent1].[BlogId] AS [BlogId]
FROM
[dbo].[Posts] AS [Extent1]
WHERE
[Extent1].[Title] LIKE N'%trovami%'
25. #sqlsatParma
#sqlsat355November 22nd, 2014
Query LINQ: Ordinare
using (var db = new BloggingContext())
{
var results = from post in db.Posts
orderby post.Title
select post;
foreach (var result in results)
Console.WriteLine(result.Title);
}
using (var db = new BloggingContext())
{
var results = db.Posts
.OrderBy(t => t.Title);
foreach (var result in results)
Console.WriteLine(result.Title);
}
using (var db = new BloggingContext())
{
var results = db.Posts
.Where(t => t.Content.Contains("trovami"))
.OrderBy(t => t.Title);
foreach (var result in results)
Console.WriteLine(result.Title);
}
SELECT
[Extent1].[PostId] AS [PostId],
[Extent1].[Title] AS [Title],
[Extent1].[Content] AS [Content],
[Extent1].[BlogId] AS [BlogId]
FROM
[dbo].[Posts] AS [Extent1]
ORDER BY
[Extent1].[Title] ASC
SELECT
[Extent1].[PostId] AS [PostId],
[Extent1].[Title] AS [Title],
[Extent1].[Content] AS [Content],
[Extent1].[BlogId] AS [BlogId]
FROM
[dbo].[Posts] AS [Extent1]
WHERE
[Extent1].[Content] LIKE N'%trovami%'
ORDER BY
[Extent1].[Title] ASC
LINQ Query OrderBy
Lambda Expression OrderBy
Lambda Expression Where + OrderBy
26. #sqlsatParma
#sqlsat355November 22nd, 2014
Query LINQ: Join(are)
Esplicite
Implicite
using (var db = new BloggingContext())
{
var results = from blog in db.Blogs
join post in db.Posts on blog.BlogId equals post.BlogId
select new
{
BlogName = blog.Name,
PostTitle = post.Title
};
foreach (var result in results)
Console.WriteLine("blog: {0} post: {1}", result.BlogName, result.PostTitle);
}
using (var db = new BloggingContext())
{
var results = from blog in db.Blogs
from post in blog.Posts
select new
{
BlogName = blog.Name,
PostTitle = post.Title
};
foreach (var result in results)
Console.WriteLine("blog: {0} post: {1}", result.BlogName, result.PostTitle);
}
SELECT
[Extent1].[BlogId] AS [BlogId],
[Extent1].[Name] AS [Name],
[Extent2].[Title] AS [Title]
FROM
[dbo].[Blogs] AS [Extent1]
INNER JOIN
[dbo].[Posts] AS [Extent2]
ON [Extent1].[BlogId] = [Extent2].[BlogId]
27. #sqlsatParma
#sqlsat355November 22nd, 2014
Query: Stored Procedure
Raw SQL Queries
http://msdn.microsoft.com/data/jj592907
public class BloggingContext : DbContext
{
public DbSet<Blog> Blogs { get; set; }
public DbSet<Post> Posts { get; set; }
public Blog GetBlogById(int blogId)
{
return this.Blogs
.SqlQuery("proc_GetBlogById @p0", blogId)
.FirstOrDefault();
}
public Blog GetBlogById2(int blogId)
{
return this.Blogs
.SqlQuery("proc_GetBlogById @BlogId",
new SqlParameter("@BlogId", blogId))
.FirstOrDefault();
}
}
28. #sqlsatParma
#sqlsat355November 22nd, 2014
Strumenti di Logging
Proprietà Log a delegato
Personalizzazione del contenuto e del formato
Sistema di intercettazione a moduli per
maggiore controllo e flessibilità
Gli Interceptor possono essere aggiunti da
config senza dovere ricompilare il progetto
BloggingContext.Database.Log = Console.Write;
30. #sqlsatParma
#sqlsat355November 22nd, 2014
Evolvere il database: Code-First Migrations
Sempre sotto il nostro controllo
Personalizzazioni (anche estreme) da
codice
Semplicità di utilizzo
Enable-Migrations
Add-Migration
Update-Database
http://msdn.microsoft.com/data/jj591621
32. #sqlsatParma
#sqlsat355November 22nd, 2014
Importare un database esistente
Da zero senza reverse engineering
Con strumenti di automazione:
Entity Framework Tools (incluso in VS2013)
www.microsoft.com/download/details.aspx?id=40762
Entity Framework Power Tools (NuGet)
EntityFramework Reverse POCO Generator (NuGet)
Code First Migrations anche per database
esistenti/importati
http://msdn.microsoft.com/data/dn579398
35. #sqlsatParma
#sqlsat355November 22nd, 2014
What’s Next
Versione 7 più leggera ed estensibile
Sarà disponibile per nuove piattaforme (Store
App, Phone App, Net Core, Mac, Linux)
Abiliterà nuovi data store, come sistemi non-
relazionali
Il passaggio a EF7 sarà semplificato il più
possibile (DbContext e DbSet saranno presenti)
Sviluppato e disponibile in pre-alpha su GitHub
https://github.com/aspnet/EntityFramework
36. #sqlsatParma
#sqlsat355November 22nd, 2014
In pillole…
Include(t => t.Posts) evita il lazy loading
http://msdn.microsoft.com/data/jj574232
Find(1) ricerca per chiave
http://msdn.microsoft.com/data/jj573936
Entity<>.ToTable("Posts", "Blog")
per creare Posts nello schema Blog
Async Query & Save
http://msdn.microsoft.com/data/jj819165
CRUD con Stored Procedure
http://msdn.microsoft.com/data/dn468673
37. #sqlsatParma
#sqlsat355November 22nd, 2014
In pillole…
Considerazioni sulle performance
http://msdn.microsoft.com/data/hh949853
Migliorare lo startup dell’applicazione con NGen
http://msdn.microsoft.com/data/dn582034
Pre-generare le Mapping Views (EDM) per
velocizzare dell’inizializzazione del DbContext
http://msdn.microsoft.com/data/dn469601
Gestione della concorrenza ottimistica
http://msdn.microsoft.com/data/jj592904
38. #sqlsatParma
#sqlsat355November 22nd, 2014
In pillole…
Migrate.exe per controllare e automatizzare il
processo di migrazione del database
http://msdn.microsoft.com/data/jj618307
AsNoTracking()
http://msdn.microsoft.com/data/jj556203
Disabilitare il tracking automatico
http://msdn.microsoft.com/data/jj556205
Unit Test: testare isolandosi dal database
http://msdn.microsoft.com/data/dn314429
ORM = Object-relational mapping
RDBMD = Relational database management system
Caching (first-level), non è la cache classica, la query viene fatta lo stesso (con eccezione del metodo Find), ma almeno l’oggetto non viene ricreato in memoria.
Esiste anche una cache di secondo livello per caching query results
The architecture of the ADO.NET Entity Framework, from the bottom up, consists of the following:
Data source specific providers, which abstract the ADO.NET interfaces to connect to the database when programming against the conceptual schema.
Map provider, a database-specific provider that translates the Entity SQL command tree into a query in the native SQL flavor of the database. It includes the Store-specific bridge, which is the component responsible for translating the generic command tree into a store-specific command tree.
EDM parser and view mapping, which takes the SDL specification of the data model and how it maps onto the underlying relational model and enables programming against the conceptual model. From the relational schema, it creates views of the data corresponding to the conceptual model. It aggregates information from multiple tables in order to aggregate them into an entity, and splits an update to an entity into multiple updates to whichever table(s) contributed to that entity.
Query and update pipeline, processes queries, filters and updates requests to convert them into canonical command trees which are then converted into store-specific queries by the map provider.
Metadata services, which handle all metadata related to entities, relationships and mappings.
Transactions, to integrate with transactional capabilities of the underlying store. If the underlying store does not support transactions, support for it needs to be implemented at this layer.
Conceptual layer API, the runtime that exposes the programming model for coding against the conceptual schema. It follows the ADO.NET pattern of using Connection objects to refer to the map provider, using Command objects to send the query, and returning EntityResultSets or EntitySets containing the result.
Disconnected components, which locally cache datasets and entity sets for using the ADO.NET Entity Framework in an occasionally connected environment.
Embedded database: ADO.NET Entity Framework includes a lightweight embedded database for client-side caching and querying of relational data.
Design tools, such as Mapping Designer, are also included with ADO.NET Entity Framework, which simplifies the job of mapping a conceptual schema to the relational schema and specifying which properties of an entity type correspond to which table in the database.
Programming layer, which exposes the EDM as programming constructs which can be consumed by programming languages.
Object services, automatically generate code for CLR classes that expose the same properties as an entity, thus enabling instantiation of entities as .NET objects.
Web services, which expose entities as web services.
High-level services, such as reporting services which work on entities rather than relational data.
POCO = Plain Old CLR Object
ICollection, per il semplice fatto che l’indexer [n] (random access) non è mappato da EF, e finirebbe per querare il database ogni volta che lo si usa.
Se sql express è presente e attivo, NuGet configurerà in config il connection factory sql express, altrimenti localdb.
Personalizzazione contenuto e formato ereditanto DatabaseLogFormatter
Interceptor per logging su file: System.Data.Entity.Infrastructure.Interception.DatabaseLogger
Profiler extended events, free tool: Xevent di idera.com