Creating a Model
Feature |
EF 6.4 |
EF Core |
Basic class mapping |
Yes |
1 |
Constructors with parameters |
|
2.1 |
Property value conversions |
|
2.1 |
Mapped types with no keys |
|
2.1 |
Conventions |
Yes |
1 |
Custom conventions |
Yes |
1.0 |
Data annotations |
Yes |
1 |
Fluent API |
Yes |
1 |
Inheritance: Table per hierarchy (TPH) |
Yes |
1 |
Inheritance: Table per type (TPT) |
Yes |
5 |
Inheritance: Table per concrete class (TPC) |
Yes |
7 |
Shadow state properties |
|
1 |
Alternate keys |
|
1 |
Many-to-many navigations |
Yes |
5 |
Many-to-many without join entity |
Yes |
5 |
Key generation: Database |
Yes |
1 |
Key generation: Client |
|
1 |
Complex/owned types |
Yes |
2 |
Spatial data |
Yes |
2.2 |
Model format: Code |
Yes |
1 |
Create model from database: Command line |
Yes |
1 |
Global query filters |
|
2 |
Table splitting |
Yes |
2 |
Database scalar function mapping |
Poor |
2 |
Database table valued function mapping |
Poor |
5 |
Field mapping |
|
1.1 |
Nullable reference types (C# 8.0) |
|
3 |
Update model from database* |
Partial |
Yes* |
Graphical visualization of model* |
Yes |
Yes* |
Graphical model editor* |
Yes |
Yes* |
Create model from database: VS wizard* |
Yes |
Yes* |
* Available in Entity Developer.
Pay attention to these differences if you think to migrate Entity Framework 6 to Core. It can be more reasonable to keep both the systems until Core gets everything it lacks now.
Querying Data
Feature |
EF 6.4 |
EF Core |
LINQ queries |
Yes |
1 |
Readable generated SQL |
Poor |
1 |
GroupBy translation |
Yes |
2.1 |
Loading related data: Eager |
Yes |
1 |
Loading related data: Eager loading for derived types |
|
2.1 |
Loading related data: Lazy |
Yes |
2.1 |
Loading related data: Explicit |
Yes |
1.1 |
Raw SQL queries: Entity types |
Yes |
1 |
Raw SQL queries: Keyless entity types |
Yes |
2.1 |
Raw SQL queries: Composing with LINQ |
|
1 |
Explicitly compiled queries |
Poor |
2 |
await foreach (C# 8.0) |
|
3 |
Text-based query language (Entity SQL) |
Yes |
|
Pay attention to these differences if you think to migrate Entity Framework 6 to Core. It can be more reasonable to keep both the systems until Core gets everything it lacks now.
Saving Data
Feature |
EF 6.4 |
EF Core |
Change tracking: Snapshot |
Yes |
1 |
Change tracking: Notification |
Yes |
1 |
Change tracking: Proxies |
Yes |
5 |
Accessing tracked state |
Yes |
1 |
Optimistic concurrency |
Yes |
1 |
Transactions |
Yes |
1 |
Stored procedure mapping |
Yes |
|
Disconnected graph low-level APIs |
Poor |
1 |
Disconnected graph End-to-end |
Poor |
1.0 |
Pay attention to these differences if you think to migrate Entity Framework 6 to Core. It can be more reasonable to keep both the systems until Core gets everything it lacks now.
Other features
Feature |
EF 6.4 |
EF Core |
Migrations |
Yes |
1 |
Database creation/deletion APIs |
Yes |
1 |
Seed data |
Yes |
2.1 |
Connection resiliency |
Yes |
1.1 |
Interceptors |
Yes |
3 |
Events |
Yes |
3.0 |
Simple Logging (Database.Log) |
Yes |
5 |
DbContext pooling |
|
2 |
Pay attention to these differences if you think to migrate Entity Framework 6 to Core. It can be more reasonable to keep both the systems until Core gets everything it lacks now.