Entity Framework and Visual Studio 2015 RC

Today Soma announced the Release Candidate of Visual Studio 2015. Our team is concurrently working on EF6.x and EF7 versions of our product and both of them make an appearance in this release.

 


Entity Framework 6.1.3

EF6.1.3 is the latest stable version of Entity Framework and is the recommended version for production applications. EF6.1.3 is a patch release containing fixes for high priority issues that were reported on EF6.1.2.

Visual Studio 2015 RC includes the RTM version of Entity Framework 6.1.3 runtime and tooling.

  • The runtime will be installed if you create a new model using the Entity Framework Tools in a project that does not already have the EF runtime installed.
  • The runtime is pre-installed in new ASP.NET projects, depending on the project template you select.
  • The EF6.1.3 Tools for Visual Studio 2015 are included to make sure you get the latest bug fixes and improvements.

You can read more about the specific fixes included in EF6.1.3 in our recent announcement post.

 


Entity Framework 7 Beta 4

EF7 will be the next major release of Entity Framework and it is currently in pre-release.

 

Still very much a preview

EF7 introduces some significant changes and improvements over EF6.x and therefore the pre-release phase of EF7 is much longer than other recent releases. We’ve made significant progress since our last pre-release, but if you decide to try out EF7 then please bear in mind that this preview is designed to give you an idea of what the experience will be like and there are still a number of limitations and missing features that will be addressed before RTM.

If you aren’t comfortable working with a prerelease that is still very much in-flux then don’t worry… there will be plenty of opportunity to try out pre-release EF7 once it is much more stable.

 

Where can I use Beta 4?

Beta 4 can be used in the following types of applications

  • ASP.NET 5 applications that target either full .NET or the new .NET Core. EF7 is included in new ASP.NET 5 applications that are created using the “Web Site” project template. The following resources will help you get started using EF7 in ASP.NET 5:
  • WPF, WinForms, Console and ASP.NET 4 applications that target .NET 4.5.1 or later. We only recommend this for trying out EF7 in sample applications. If you are writing a production application then you should continue to use EF6.x. We do not recommend attempting to upgrade an EF6.x application to EF7 at this stage as there are still key features yet to be implemented on EF7 (such as inheritance support which is currently being implemented).
  • Mac and Linux applications targeting Mono 3.12.1 or later can make use of EF7. We have not done extensive testing of this scenario, but basic query and save functionality works.

 

What databases can I target with Beta 4?

Currently you can target SQL Server or our in-memory store (designed to help with testing). These providers are available in the EntityFramework.SqlServer and EntityFramework.InMemory NuGet packages.

We are working on other providers that will be available for the next prerelease (more on that below).

 

What’s implemented in Beta 4?

Here is a rough guide to what currently works in Beta 4. Most of these features are a work-in-progress and still have limitations.

  • Basic modeling including built-in conventions, table/column mapping, and relationships
  • Change tracking
  • LINQ queries
  • Table based Insert/Update/Delete (including batching)
  • Migrations and database creation/deletion
  • Transactions (including automatic transactions during SaveChanges and explicit transaction APIs)
  • Identity and Sequence patterns for database generated key values
  • Raw SQL commands
  • An early preview of reverse engineering a model from a database
  • Logging
  • Unique constraints including the ability to use them as keys in a relationship

 

What’s Next

Here are some of the areas we are currently working on (or working with other development teams to deliver). You can see many of these features already underway in our working code base.

Providers

There is work underway to enable the following database providers. We’ve also had contact with many other providers who are planning to provide EF7 support.

  • SQLite (being developed by the EF team)
  • PostgreSql (being developed by the npgsql team)
  • MySql (being developed by the MySql team)

Platforms

We are working to enable EF7 use on the following platforms:

  • Windows 10 Universal Application Platform
  • Cross-platform .NET for Mac and Linux
  • Android and iOS Mono frameworks

Features

Here are a number of the cross-cutting features we are currently working on. This isn’t all we will be doing for RTM, just what’s currently underway.

  • Inheritance
  • Cascade delete
  • Template-based reverse engineering from a database