Archive

Archive for the ‘Entity Framework’ Category

EF7 RC1 & EF Moving to the .NET Blog

November 18th, 2015 No comments

Moving to the .NET Blog

Like a number of other teams that write libraries for the .NET Framework, we have decided to join the list of bloggers that post to the .NET Framework blog. This provides a central location where you can keep up to date with all the .NET related news from Microsoft. We have an Entity Framework tag that we will use whenever we post, so you can always filter posts to just those about EF.

You can expect the same style and content in our posts… you’ll just find us in a new location.

EF7 RC1 Available

In other news, today we are making Entity Framework 7 RC1 available… you can read all about it on the .NET Blog.

Categories: Entity Framework, What's new Tags:

EF7 Beta 8 Available

October 15th, 2015 No comments

Today we are making Entity Framework 7 Beta 8 available. EF7 will be the next major release of Entity Framework and is currently in pre-release.

 

EF7 may not be for you… yet

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. If you are writing a production application then you should continue to use EF6.x.

Because of the fundamental changes in EF7 we do not recommend attempting to port an EF6.x application to EF7 at this stage. We will provide guidance on when this is recommended and how to do it closer to final release. EF6.x will continue to be a supported release for some time.

 

Getting started with Beta 8

We have made a modest start on documentation for EF7, you can view the current documentation at http://ef.readthedocs.org.

Supported platforms

You can use Beta 8 in the following types of applications.

Supported databases

The following database providers are available on NuGet.org and support Beta 8. See our providers page for more information and links to getting started.

We’d like to thank Shay Rojansky and Erik Ejlskov Jensen for their collaboration to provide the Npgsql and SQL Compact providers and drive improvements in the core EF7 code base.

 

What’s implemented in Beta 8

Beta 8 has mostly been about improving the features already implemented in previous betas to make them more usable and stable.

  • Basic modeling including built-in conventions, table/column mapping, and relationships
    • Fluent API (a.k.a ModelBuilder/OnConfiguring API) for configuring your model
    • Data Annotations for configuring your model
  • 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 queries (via DbSet.FromSql)
  • Logging
  • Alternate keys including the ability to use them as keys in a relationship
  • Reverse engineering a model from an existing database

 

What are we working on now?

The following features are currently being implemented

  • Cascade delete support
  • Table-Per-Hierarchy inheritance pattern
  • .NET Native support

Aside from the in-flight features listed above, our efforts from now until our initial release will be on cross-cutting quality concerns.

  • Bug fixing
  • Performance tuning
  • API reviews
  • Documentation
  • etc.

 

What about EF6.x?

Given that we have said EF6.x will continue to be a supported release, and that we will continue with bug fixes and small improvements to the code base, you may be asking why there hasn’t been much activity on the EF6.x CodePlex project for the last 6 months.

For the lead up to initial release of EF7 we are having our team focus almost solely on the EF7 project, but once we get EF7 stabilized and ready for release we will be transitioning back to dedicating some time to work on EF6.x. Our initial focus will be to get a pre-release of EF6.2 available. This will start with processing the outstanding pull requests and fixing the bugs we have already allocated to the EF6.2 release. We anticipate having the first preview of EF6.2 available shortly after EF7 reaches RTM.

EF7 Beta 6 Available

July 27th, 2015 No comments

Today we are making Entity Framework 7 Beta 6 available. 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. 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.

Docs

We have made a modest start on documentation for EF7, you can view the current documentation at http://ef.readthedocs.org. Obviously the URL will be replaced with something ‘pretty’ before we reach stable release.

Beta 6 Platforms

You can use EF7 Beta 6 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.
  • Full .NET applications (Console, WPF, WinForms, and ASP.NET 4) that target .NET 4.5 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 4.0.0 or later.
  • Universal Windows Platform (UWP) will be supported by Beta 6 when the final release of Windows 10 Developer Tools is made available. It will not work with the developer tools previews that were released prior to the RTM due to changes in the NuGet package layout.

Beta 6 Databases

The following database providers are available on NuGet.org and support Beta 6. See our providers page for more information and links to getting started.

What’s implemented in Beta 6?

The following features have been implemented since Beta 5.

  • Data annotations (excluding the relationship annotations which we are working on at the moment)
  • Customization of reverse engineer via templates
  • Raw SQL commands (via Database.ExecuteSqlCommand)

The following features were implemented in previous pre-releases and continue to be available in Beta 5 (most of them with improvements).

  • 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 queries (via DbSet.FromSql)
  • An early preview of reverse engineering a model from a database
  • Logging
  • Alternate keys including the ability to use them as keys in a relationship

What are we working on now?

Most of our effort from now until our initial release will be on cross-cutting quality concerns.

  • Bug fixing
  • Performance tuning
  • API reviews
  • Documentation
  • etc.

There are a handful of features that we are implementing before our initial RTM.

  • TPH Inheritance
  • Cascade delete
  • Deployment of database changes via migrations

Entity Framework and Visual Studio 2015 RC

April 29th, 2015 No comments

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
Categories: Announcement, Entity Framework Tags:

EF6.1.3 RTM Available

March 10th, 2015 No comments

Today we are pleased to announce the availability of EF6.1.3. This patch release contains only high priority bug fixes.

 

What’s in EF6.1.3?

EF6.1.3 just contain fixes to high priority issues that have been reported on the 6.1.2 release. The fixes include:

 

Where do I get EF6.1.3?

The runtime is available on NuGet. Follow the instructions on our Get It page for installing the latest version of Entity Framework runtime.

The tooling is available on the Microsoft Download Center. You only need to install the tooling if you want to create models using the EF Designer, or generate a Code First model from an existing database.

 

What’s next?

In addition to working on the next major version of EF (Entity Framework 7), we’re also working on another update to EF6. We’ve already made a series of changes and accepted some community contributions into the code base for this next release. We don’t have a specific timeline for the release just yet.

Categories: Entity Framework, What's new Tags:

EF6.1.3 Beta 1 Available

February 12th, 2015 No comments

Today we are making Beta 1 of the EF6.1.3 release available. This patch release contains only high priority bug fixes.

 

What are the 6.1.3 release timelines?

At this stage we are planning for our next release to be the RTM. This may change if we get additional reports of high priority bugs that we decide should be fixed in 6.1.3.

We expect to ship the next release sometime next month but this may change if we decided to take additional changes.

 

What’s in Beta 1?

EF6.1.3 will just contain fixes to high priority issues that have been reported on the 6.1.2 release. The fixes included in beta 1 are:

 

Where do I get the beta?

The runtime is available on NuGet. Follow the instructions on our Get It page for installing the latest pre-release version of Entity Framework runtime.

The tooling for Visual Studio 2012 and Visual Studio 2013 is available on the Microsoft Download Center.

 

Support

This is a preview of changes that will be available in the final release of EF6.1.3 and is designed to allow you to try out the new features and report any issues you encounter. Microsoft does not guarantee any level of support on this release.

If you need assistance using the new features, please post questions on Stack Overflow using the entity-framework tag.

Categories: Entity Framework, What's new Tags:

EF6.1.2 RTM Available

December 22nd, 2014 No comments

Today we are pleased to announce the availability of EF6.1.2. This patch release includes a number of high priority bug fixes and some contributions from our community.

 

What’s in EF6.1.2?

EF6.1.2 is mostly about bug fixes, you can see a list of the fixes included in EF6.1.2 on our CodePlex site.

We also accepted a couple of noteworthy changes from members of the community:

  • Query cache parameters can be configured from the app/web.configuration file
    <entityFramework>   
      <queryCache size='1000' cleaningIntervalInSeconds='-1'/>  
    </entityFramework>
  • SqlFile and SqlResource methods on DbMigration allow you to run a SQL script stored as a file or embedded resource.

 

Where do I get EF6.1.2?

The runtime is available on NuGet. Follow the instructions on our Get It page for installing the latest version of Entity Framework runtime.

The tooling is available on the Microsoft Download Center. You only need to install the tooling if you want to create models using the EF Designer, or generate a Code First model from an existing database.

 

Thank you to our contributors

We’d like to say thank you to folks from the community who have contributed to the 6.1.2 release so far:

  • BrandonDahler
  • ErikEJ
  • Honza Široký
  • martincostello
  • UnaiZorrilla

 

What’s next?

In addition to working on the next major version of EF (Entity Framework 7), we’re also working on another update to EF6. This update to EF6 is tentatively slated to be another patch release (EF6.1.3) and we are working a series of bug fixes and accepting pull requests.

Categories: Entity Framework, What's new Tags:

EF7 – Priorities, Focus, and Initial Release

December 2nd, 2014 No comments

We all know, you don’t get to write software in a vacuum. Aside from the technical task we are trying to achieve there are things such as dependencies, stakeholders, release dates, etc. that impact the order and priority of tasks we do. In this post we wanted to share the top factors influencing the features and scenarios we focus on first.

 

Where are we at?

Up until recently we’ve been focused on validating our “New Platforms, New Data Stores” vision for EF7. This has meant building out a core framework, experimenting with patterns to support data stores with different capabilities, and implementing providers to validate our work.

In terms of data stores, we have experimented with SQL Server, SQLite, InMemory, Azure Table Storage, and Redis providers. We’ve also had discussions with other folks looking at DocumentDB, SQL Compact, and MongoDB providers.

For platforms, we have targeted traditional .NET Framework applications (WPF, WinForms, Console, and ASP.NET 4), Phone/Store/Universal, and ASP.NET 5 (a.k.a ASP.NET vNext).

The vision for EF7 is “a core framework that handles concepts common to most data stores with provider specific extensions that become available when you target a specific provider”. At this stage we feel confident that our architecture works well for our initial scenarios/providers and can evolve to accommodate future requirements.

 

What’s next?

Now that we are confident we are building the right thing, it’s time to start working towards a product that developers can use to write real applications with.

This means we need to focus on tasks such as completing functionality, improving quality, ensuring performance, adding logging, exploring usability, etc.

One approach to this would be to plug away until we have a production ready product for all providers and platforms that has all the standard features that we expect from an O/RM (of course, with plenty of previews along the way). If we operated in a vacuum, this is the approach our team would choose to take as it would mean we would launch with the best possible product. However, in the real world we have a series of partners and commitments that mean we need to focus on meeting these goals in incremental steps.

 

What’s our top priority?

Our team’s top commitment is to provide a data access stack for ASP.NET 5. Because ASP.NET 5 allows apps to target CoreCLR, the existing EF6.x product cannot provide this functionality (as it does not run on CoreCLR and it is not feasible to update it to do so). Within ASP.NET 5 our primary focus is on SQL Server, and then PostgreSQL to support the standard Mac/Linux environment.

Because ASP.NET 5 applications can also target the full .NET Framework, fulfilling our commitments to ASP.NET 5 will also allow EF7 to be used in other applications that target full .NET (WPF, WinForms, Console, and ASP.NET 4).

After fulfilling our ASP.NET 5 commitments, the other priorities of our team are as follows. These are in no particular order and we will likely work on them in parallel.

  • Implement additional features
  • Support EF7 on other platforms (Phone, Store, etc.)
  • Deliver additional providers that our team will own (SQLite, Azure Table Storage, etc.)

 

What does this mean?

Scoping functionality for ASP.NET 5 release

To meet the dates for the initial release of ASP.NET 5 we are going to have to scope the functionality of EF7 to exclude some features that we would consider basic O/RM functionality. Examples of this include lazy loading and inheritance mapping patterns.

Because of this, we won’t be pushing EF7 as the ‘go-to release’ for all platforms at the time of initial ASP.NET 5 release. More details on this later in the post.

Temporary removal of providers from working branch

In order to focus on our top priorities we are going to move several providers to a separate branch that we will not always keep updated with the latest changes. The packages will also not be published as part of nightly builds or pre-releases to NuGet.org. The impacted providers are SQLite, Azure Table Storage, and Redis. This will allow us to iterate on the core framework without the overhead of keeping multiple providers and their tests up-to-date as we go through various interim stages of the core framework.

Once we have stabilized the core and the code churn reduces, we will bring back the additional providers to validate the core framework again and begin working towards an initial release of these providers.

One important implication is that the SQLite provider will temporarily not be kept up-to-date or published in our nightly builds. This temporarily removes the ability to target Phone/Store applications during this period.

Tasks we’ll be working on

Scoping features and removing some providers will allow us to focus on the following activities for the initial ASP.NET 5 release.

  • Complete in-flight features
  • Fix bugs
  • Add test coverage
  • Test and improve performance
  • API reviews
  • Exploratory Testing
  • Clear exceptions for unsupported scenarios
  • Documentation
  • Add logging throughout stack

 

Initial release for ASP.NET 5 != recommended release

As previously mentioned, we won’t be pushing EF7 as the ‘go-to release’ for all platforms at the time of the initial release to support ASP.NET 5. EF7 will be the default data stack for ASP.NET 5 applications, but we will not recommend it as an alternative to EF6 in other applications until we have more functionality implemented.

Given that ASP.NET 5 is in the same ‘part v1 and part vNext’ position as EF, the missing features will be less of an issue. We will of course be working to make them available ASAP.

We are discussing ways to make this clearer when it comes time to ship a stable version of the EntityFramework package to support ASP.NET 5. We haven’t locked on the details yet (and won’t until we get closer to release) but some options we are considering are:

  • Still have the NuGet package marked as pre-release so that it is not installed when you ask for the latest stable version.
  • Only support the ASP.NET 5 platforms so that it is not inadvertently installed in other applications. In this scenario you could still install a pre-release package for use on other platforms.

 

Summary

To ensure we meet our primary commitments to ASP.NET 5 we are going to be focusing on rounding out the existing features and the SQL Server provider for EF7.

This means scoping out some very important features and we will not be encouraging folks to transition from EF6 to EF7 until these features are added.

We will temporarily be suspending work on SQLite, Azure Table Storage, and Redis providers and they will not be included in nightly builds. These are important scenarios for us and we will re-enable them as soon as we meet our ASP.NET 5 commitments.

We understand this is disappointing to many folks. Most notably, temporarily disabling Phone/Store was a painful decision for us to make. Our team would love to work in isolation and make EF7 a complete and polished product on many providers and platforms before initial release. Unfortunately that is not the case, so we’re working to meet our commitments while still delivering on the all up vision in a reasonable time frame.

Categories: Entity Framework, What's new Tags:

EF6.1.2 Beta 2 Available

November 14th, 2014 No comments

Today we are making Beta 2 of the EF6.1.2 release available. This patch release contains bug fixes and some contributions from our community.

 

When will EF6.1.2 RTM?

We were originally planning to go straight to RTM from Beta 1. However, we ended up taking a number of important bug fixes after Beta 1 shipped and we decided that the churn in the code base warranted another pre-release before we RTM. The pre-releases are important because they allow our customers and provider/extension writers to report any issues before we ship the RTM release.

Our plan is to ship RTM sometime next month. This may change if we have additional high priority bugs reported on Beta 2.

 

What’s in Beta 2?

EF6.1.2 is mostly about bug fixes, you can see a list of the fixes included in EF6.1.2 on our CodePlex site.

We also accepted a couple of noteworthy changes from members of the community:

  • Query cache parameters can be configured from the app/web.configuration file
    <entityFramework>   
      <queryCache size='1000' cleaningIntervalInSeconds='-1'/>  
    </entityFramework>
  • SqlFile and SqlResource methods on DbMigration allow you to run a SQL script stored as a file or embedded resource.

  • DbContext.Database.CurrentTransaction gives you access to the transaction the underlying store connection is enlisted in.

 

Where do I get the beta?

The runtime is available on NuGet. Follow the instructions on our Get It page for installing the latest pre-release version of Entity Framework runtime.

The tooling for Visual Studio 2012, Visual Studio 2013, and Visual Studio 2015 Preview is available on the Microsoft Download Center.

 

Support

This is a preview of changes that will be available in the final release of EF6.1.2 and is designed to allow you to try out the new features and report any issues you encounter. Microsoft does not guarantee any level of support on this release.

If you need assistance using the new features, please post questions on Stack Overflow using the entity-framework tag.

 

Thank you to our contributors

We’d like to say thank you to folks from the community who have contributed to the 6.1.2 release so far:

  • BrandonDahler
  • ErikEJ
  • Honza Široký
  • martincostello
  • UnaiZorrilla