Entity Framework 7: What's New?

Post on 13-Jan-2017

883 views 1 download

Transcript of Entity Framework 7: What's New?

Entity Framework 7: What’s New?Ricardo PeresTechnical Evangelist at Simplifydigital. Microsoft MVP.@RJPeres75

</WEBA 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)

</WEBHighlights

HighlightsImportant 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!

</WEBChanges

ChangesWhat’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

</WEBDepartures

DeparturesRemoved 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

</WEBNewcomers

NewcomersFunctionality 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

</WEBDemo

</WEBStill expected

Still expectedWill 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

</WEBNot now

Now nowIn 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

</WEBMaybe 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

</WEBQuestions?

</WEBThank you!

More at:Blog: Development With A DotTwitter: @RJPeres75

#mswebcamp