Entity Framework 7: What’s New?
Ricardo Peres
Technical Evangelist at Simplifydigital. Microsoft MVP.
@RJPeres75
</WEB
A bit of history
A bit of history
V1
•.NET 3.5 SP1
•Model First /
Database
First
V2 (4)
•.NET 4
•POCOs
•Lazy Loading
•T4
V3 (4.1)
•.NET 4
•Code First
•Migrations
•NuGet
V4 (5)
•.NET 4
•Enums
•Spatial
•Table-valued
functions
V5 (6)
•.NET 4
•Interceptors
•Logging
•Async
•Custom
conventions
•Stored
procedures
V6 (7)
•.NET 4.5.1
•NoSQL
•Multi
platform
(.NET Core)
</WEB
Highlights
Highlights
Important stuff
• Entity Framework 7 is the next version of EF – Microsoft’s Data API
• Built on .NET 4.5.1+ and .NET Core
• Runs on Windows Phone and Windows Store apps, Linux and Mac –
wherever .NET Core is available
• Supports non-relational data stores and in-memory
• Scheduled for Q1 2016 – feature complete now
Not recommended for production usage!
</WEB
Changes
Changes
What’s new
• Totally rewritten code base
• Provider-based: built-in providers include in-memory, SQL Server,
SQLite, PostgreSQL, SQL Server Compact Edition, Redis and Azure
Table Storage
• Available on GitHub: https://github.com/aspnet/EntityFramework
• Different Nuget packages for different providers – very modular
• Some cool new features, but many won’t be available on v7.0
• Improved SQL generation
</WEB
Departures
Departures
Removed features
• ObjectContext API
• Entity-SQL – should use LINQ or SQL instead
• Model-first (aka, EDMX) – use database first or code first
• Database initializers – use migrations
• .NET 4.x support
• Automatic migrations – customize generated migrations
</WEB
Newcomers
Newcomers
Functionality previously unavailable
• .NET Core makes it possible to run on Mac, Linux, Windows Phone,
Windows Store
• Provider model makes it possible to support non-relational data
stores (e.g., in-memory, NoSQL)
• Pluggable primary key generators (e.g., HiLo, sequence, identity,
manual)
• Batching of Creates, Updates and Deletes
• Mixing of LINQ and SQL
• Executing client-side functions in LINQ
• Shadow properties – properties that do not exist in the POCO model
</WEB
Demo
</WEB
Still expected
Still expected
Will be ready when launched
• Logging
• Full data annotations support
• Cascade deletes of orphans
• Table Per Hierarchy inheritance pattern
See more: https://github.com/aspnet/EntityFramework/wiki/Roadmap
</WEB
Not now
Now now
In the backlog for later
• Lazy and eager loading
• Custom conventions
• Table Per Class, Table Per Concrete Class patterns
• Entity/table splitting
• Many:many relations without middle entity
• Data seeding
• Full logging
• Generate model from the database
• Complex types
• Stored procedures support for CUDs
• Connection resiliency
• Interception
• Azure Table Storage, Redis
• Type conversions
</WEB
Maybe some other
time...
Maybe some other time...
May be available in the future
• Different kinds of collections (maps, sets)
• Collections of value types
• Lazy properties
• Formula properties
• Filters
</WEB
Questions?
</WEB
Thank you!
More at:
Blog: Development With A Dot
Twitter: @RJPeres75
#mswebcamp
Entity Framework 7: What's New?

Entity Framework 7: What's New?

  • 2.
    Entity Framework 7:What’s New? Ricardo Peres Technical Evangelist at Simplifydigital. Microsoft MVP. @RJPeres75
  • 3.
  • 4.
    A bit ofhistory V1 •.NET 3.5 SP1 •Model First / Database First V2 (4) •.NET 4 •POCOs •Lazy Loading •T4 V3 (4.1) •.NET 4 •Code First •Migrations •NuGet V4 (5) •.NET 4 •Enums •Spatial •Table-valued functions V5 (6) •.NET 4 •Interceptors •Logging •Async •Custom conventions •Stored procedures V6 (7) •.NET 4.5.1 •NoSQL •Multi platform (.NET Core)
  • 5.
  • 6.
    Highlights Important stuff • EntityFramework 7 is the next version of EF – Microsoft’s Data API • Built on .NET 4.5.1+ and .NET Core • Runs on Windows Phone and Windows Store apps, Linux and Mac – wherever .NET Core is available • Supports non-relational data stores and in-memory • Scheduled for Q1 2016 – feature complete now Not recommended for production usage!
  • 7.
  • 8.
    Changes What’s new • Totallyrewritten code base • Provider-based: built-in providers include in-memory, SQL Server, SQLite, PostgreSQL, SQL Server Compact Edition, Redis and Azure Table Storage • Available on GitHub: https://github.com/aspnet/EntityFramework • Different Nuget packages for different providers – very modular • Some cool new features, but many won’t be available on v7.0 • Improved SQL generation
  • 9.
  • 10.
    Departures Removed features • ObjectContextAPI • Entity-SQL – should use LINQ or SQL instead • Model-first (aka, EDMX) – use database first or code first • Database initializers – use migrations • .NET 4.x support • Automatic migrations – customize generated migrations
  • 11.
  • 12.
    Newcomers Functionality previously unavailable •.NET Core makes it possible to run on Mac, Linux, Windows Phone, Windows Store • Provider model makes it possible to support non-relational data stores (e.g., in-memory, NoSQL) • Pluggable primary key generators (e.g., HiLo, sequence, identity, manual) • Batching of Creates, Updates and Deletes • Mixing of LINQ and SQL • Executing client-side functions in LINQ • Shadow properties – properties that do not exist in the POCO model
  • 13.
  • 14.
  • 15.
    Still expected Will beready when launched • Logging • Full data annotations support • Cascade deletes of orphans • Table Per Hierarchy inheritance pattern See more: https://github.com/aspnet/EntityFramework/wiki/Roadmap
  • 16.
  • 17.
    Now now In thebacklog for later • Lazy and eager loading • Custom conventions • Table Per Class, Table Per Concrete Class patterns • Entity/table splitting • Many:many relations without middle entity • Data seeding • Full logging • Generate model from the database • Complex types • Stored procedures support for CUDs • Connection resiliency • Interception • Azure Table Storage, Redis • Type conversions
  • 18.
  • 19.
    Maybe some othertime... May be available in the future • Different kinds of collections (maps, sets) • Collections of value types • Lazy properties • Formula properties • Filters
  • 20.
  • 21.
    </WEB Thank you! More at: Blog:Development With A Dot Twitter: @RJPeres75
  • 23.