Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

EF6 or EF Core? How Do I Choose?

5,505 views

Published on

Oct 2016 Presentation at DevIntersection.
By one of the most respected authorities on Entity Framework.

Published in: Software
  • Be the first to comment

EF6 or EF Core? How Do I Choose?

  1. 1. EF Core or EF 6 How Do I Choose? Julie Lerman @julielerman about.me/julielerman
  2. 2. Entity Framework in the Enterprise (Update) Play by Play: First Look at EF Core Getting Started with EF6 Domain-Driven Design Fundamentals Looking Ahead to Entity Framework 7 EF6 Ninja Edition: What’s New in EF6 Automated Testing for Fraidy Cats Like Me Getting Started with Entity Framework 5 Entity Framework Code First Migrations Data Layer Validation with Entity Framework 4.1+ Entity Framework 4.1 - DbContext Data Access Entity Framework 4.1 - Code First Querying the Entity Framework Designer Supported EDM Customization Entity Framework and Data Models Entity Framework 4.0 By Example My Courses on
  3. 3. Important Information Demos Prepare/migrate EF6 code Q&A
  4. 4. From Entity Framework to EF Core EF 2008 EF4 2010 4.1 2011 5 2012 6 2013 EF Core 1.0 June 2016 EF Core 1.1 Q4’16/Q1’17 6.13- > 6M downloads
  5. 5. New features Cross-platform New code base Performance++ 8 Years 6M+ downloads “battle tested” V6 brought advanced features EF6 or EF Core?
  6. 6. Unified platform .NET STANDARD LIBRARY
  7. 7. Ready for Limited Primetime Stable Performant Integrates with ASP.NET Core Cross Platform Downsides today - features - tooling - .Net Core is a moving target
  8. 8. .NET & Windows ASP.NET Core X Platform .NET Core EF Core Unless you are truly compelled by EF Core EF6
  9. 9. ASP.NET Core & EF6
  10. 10. EF Core 1.0.0 EF Core 1.0.0 EF Core 1.1.0 EF Core 1.1.0 EF6 Feature Set EF Core >1.1.0 EF Core >1.1.0 Never coming to EF Core NewLimitedParity EF6 Features vs EF Core Features
  11. 11. bit.ly/efcoreroadmap ”EF6.x continues to be the best version of EF for a number of applications until these features are implemented”
  12. 12. No Microsoft EDMX/Designer
  13. 13. Reverse Engineer in EF Core EF Core Migrations scaffold command
  14. 14. You do not have to re-learn everything
  15. 15. But… it’s still new & different
  16. 16. The Big Q’s We’re starting a new app. Should we use EF6 or EF Core? We’re updating our app. Should we use EF Core? EF6? Wait?
  17. 17. Existing Migration not Upgrade Not backwards compat Missing features Eliminated features Don’t, Unless You Must!* New Apps “V.1” Comfort? Feature Decision .NET Core : EF Core
  18. 18. Biggest Planned Feature Cuts EDMX Support ObjectContext API Entity SQL Metadata Workspace API Overly complex mappings MEST* mapping Automatic Migrations *Multiple Entities for Single Type
  19. 19. EF6 EF Core Production Ready Actively Evolving Visual Designer *expect 3rd party support Backwards Compatible Full .NET Support .NET Core Support Lightweight API(s) Better APIs, New Features Non-Relational Data *coming post 1.1 Open-Source (on Github) *4.5.1 +
  20. 20. Migrating Code Simple models and code with Code First, DbContext, Migrations
  21. 21. Migrating Code Simple models and code with Code First, DbContext, Migrations Complex models and code with Code First, DbContext, Migrations
  22. 22. Migrating Code Simple models and code with Code First, DbContext, Migrations Complex models and code with Code First, DbContext, Migrations Small EDMX models, simple actions, with DbContext
  23. 23. Migrating Code Simple models and code with Code First, DbContext, Migrations Complex models and code with Code First, DbContext, Migrations Small EDMX models, simple actions, with DbContext Large EDMX, mappings, not so simple interaction, DbContext
  24. 24. Migrating Code Simple models and code with Code First, DbContext, Migrations Complex models and code with Code First, DbContext, Migrations Small EDMX models, simple actions, with DbContext Large EDMX, mappings, not so simple interaction, DbContext ObjectContext, ESQL
  25. 25. EF6 EF Core Existing Code
  26. 26. Build with EF6, keeping EF Core in mind
  27. 27. Isolate and Update Parts of Your App
  28. 28. public Thing GetThatThing() { return Data.GetThatThing(); } IData EF6.Data : IData EFCore.Data : IData
  29. 29. Bottom Line for Near Future EF Core is best for new, .Net Core apps Know what is and is not there Use it if you know it suits you Be very picky about EF6->EFCore Use EF6 until EF Core is ready for you Plan ahead with good design
  30. 30. Resources Pluralsight: Play by Play : EF Core First Look (bit.ly/PS_EFCoreLook) Coming soon: Getting Started with EF Core EF Docs: docs.efproject.net EFCore: github.com/aspnet/entityframework EF6: github.com/aspnet/entityframework6 Roadmap: bit.ly/efcoreroadmap Julie Lerman TheDataFarm.com @julielerman
  31. 31. Julie Lerman @julielerman about.me/julielerman

×