{"id":38813,"date":"2022-02-17T10:00:24","date_gmt":"2022-02-17T17:00:24","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=38813"},"modified":"2022-02-17T11:35:06","modified_gmt":"2022-02-17T18:35:06","slug":"announcing-entity-framework-7-preview-1","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-entity-framework-7-preview-1\/","title":{"rendered":"Announcing Entity Framework 7 Preview 1"},"content":{"rendered":"<p>Today, the .NET data team announces the first preview release of\n<a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore\/7.0.0-preview.1.22076.6\">EF Core 7.0 (EF7)<\/a>.\nThis release contains mostly bug fixes and foundation work for larger features that will land in later previews. Be sure to read the <a href=\"https:\/\/docs.microsoft.com\/ef\/core\/what-is-new\/ef-core-7.0\/plan\">full plan for EF7<\/a> to learn what&#8217;s on the roadmap.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>EF7 currently targets .NET 6. This will likely be updated to .NET 7 as we near the release. <\/li>\n<li>EF7 will not run on .NET Framework.<\/li>\n<\/ul>\n<p>EF7 is the successor to EF Core 6.0, not to be confused with <a href=\"https:\/\/github.com\/dotnet\/ef6\">EF6<\/a>. If you are considering upgrading from EF6, please read our guide to <a href=\"https:\/\/docs.microsoft.com\/ef\/efcore-and-ef6\/porting\/\">port from EF6 to EF Core<\/a>.<\/p>\n<hr \/>\n<h2>How to get EF7 previews<\/h2>\n<p>EF7 is distributed exclusively as a set of NuGet packages.\nFor example, to add the SQL Server provider to your project, you can use the following command using the dotnet tool:<\/p>\n<pre><code class=\"language-bash\">dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 7.0.0-preview.1.22076.6<\/code><\/pre>\n<p>This following table links to the preview 1 versions of the EF Core packages and describes what they are used for.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: right\"><strong>Package<\/strong><\/th>\n<th style=\"text-align: left\"><strong>Purpose<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore<\/a><\/td>\n<td style=\"text-align: left\">The main EF Core package that is independent of specific database providers<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.SqlServer\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.SqlServer<\/a><\/td>\n<td style=\"text-align: left\">Database provider for Microsoft SQL Server and SQL Azure<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite<\/a><\/td>\n<td style=\"text-align: left\">SQL Server support for spatial types<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Sqlite\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.Sqlite<\/a><\/td>\n<td style=\"text-align: left\">Database provider for SQLite that includes the native binary for the database engine<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Sqlite.Core\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.Sqlite.Core<\/a><\/td>\n<td style=\"text-align: left\">Database provider for SQLite <em>without<\/em> a packaged native binary<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite<\/a><\/td>\n<td style=\"text-align: left\">SQLite support for spatial types<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Cosmos\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.Cosmos<\/a><\/td>\n<td style=\"text-align: left\">Database provider for Azure Cosmos DB<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.InMemory\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.InMemory<\/a><\/td>\n<td style=\"text-align: left\">The in-memory database provider<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Tools\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.Tools<\/a><\/td>\n<td style=\"text-align: left\">EF Core PowerShell commands for the Visual Studio Package Manager Console; use this to integrate tools like <a href=\"https:\/\/docs.microsoft.com\/ef\/core\/managing-schemas\/scaffolding\">scaffolding<\/a> and <a href=\"https:\/\/docs.microsoft.com\/ef\/core\/managing-schemas\/migrations\/\">migrations<\/a> with Visual Studio<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Design\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.Design<\/a><\/td>\n<td style=\"text-align: left\">Shared design-time components for EF Core tools<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Proxies\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.Proxies<\/a><\/td>\n<td style=\"text-align: left\">Lazy-loading and change-tracking proxies<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Abstractions\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.Abstractions<\/a><\/td>\n<td style=\"text-align: left\">Decoupled EF Core abstractions; use this for features like extended data annotations defined by EF Core<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Relational\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.Relational<\/a><\/td>\n<td style=\"text-align: left\">Shared EF Core components for relational database providers<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: right\"><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Analyzers\/7.0.0-preview.1.22076.6\">Microsoft.EntityFrameworkCore.Analyzers<\/a><\/td>\n<td style=\"text-align: left\">C# analyzers for EF Core<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>We also published the 7.0 preview 1 release of the <a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.Data.Sqlite\/7.0.0-preview.1.22076.6\">Microsoft.Data.Sqlite<\/a> provider for <a href=\"https:\/\/docs.microsoft.com\/dotnet\/framework\/data\/adonet\/ado-net-overview\">ADO.NET<\/a>.<\/p>\n<h2>Installing the EF7 Command Line Interface (CLI)<\/h2>\n<p>Before you can execute EF7 Core migration or scaffolding commands, you&#8217;ll have to install the CLI package as either a global or local tool.<\/p>\n<p>To install the preview tool globally, install with:<\/p>\n<pre><code class=\"language-bash\">dotnet tool install --global dotnet-ef --version 7.0.0-preview.1.22076.6<\/code><\/pre>\n<p>If you already have the tool installed, you can upgrade it with the following command:<\/p>\n<pre><code class=\"language-bash\">dotnet tool update --global dotnet-ef --version 7.0.0-preview.1.22076.6<\/code><\/pre>\n<p>It&#8217;s possible to use this new version of the EF7 CLI with projects that use older versions of the EF Core runtime.<\/p>\n<hr \/>\n<h2>What&#8217;s new in EF7 Preview 1<\/h2>\n<p>The list of issues that are addressed in preview 1 is available <a href=\"https:\/\/github.com\/dotnet\/efcore\/issues?q=is:issue+milestone:7.0.0-preview1+is:closed\">on GitHub<\/a>. There are over 80 issues addressed. We&#8217;d like to extend a special thanks to our community contributors to this preview, including:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/0xced\">@0xced<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/bobbyangers\">@bobbyangers<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/cocowalla\">@cocowalla<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/EamonHetherton\">@EamonHetherton<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/ErikEJ\">@ErikEJ<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/midgleyc\">@midgleyc<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/stefannikolei\">@stefannikolei<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/stevendarby\">@stevendarby<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/vonzshik\">@vonzshik<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/yecril71pl\">@yecril71pl<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/yosoyhabacuc\">@yosoyhabacuc<\/a><\/li>\n<\/ul>\n<h2>Daily builds<\/h2>\n<p>EF7 previews are aligned with .NET 7 previews. These previews tend to lag behind the latest work on EF7. Consider using the <a href=\"https:\/\/github.com\/aspnet\/AspNetCore\/blob\/master\/docs\/DailyBuilds.md\">daily builds<\/a> instead to get the most up-to-date EF7 features and bug fixes.<\/p>\n<p>As with the previews, the daily builds require .NET 6.<\/p>\n<h2>The .NET Data Community Standup<\/h2>\n<p>The .NET data team is now live streaming every other Wednesday at 10am Pacific Time, 1pm Eastern Time, or 17:00 UTC. Join the stream to ask questions about the data-related topic of your choice, including the latest preview release. <\/p>\n<ul>\n<li><a href=\"https:\/\/aka.ms\/efstandups\">Watch our YouTube playlist<\/a> of previous shows<\/li>\n<li><a href=\"https:\/\/dotnet.microsoft.com\/platform\/community\/standup\">Visit the .NET Community Standup<\/a> page to preview upcoming shows<\/li>\n<li><a href=\"https:\/\/github.com\/dotnet\/efcore\/issues\/22700\">Submit your ideas<\/a> for a guest, product, demo, or other content to cover<\/li>\n<\/ul>\n<h2>Documentation and feedback<\/h2>\n<p>The starting point for all EF Core documentation is <a href=\"https:\/\/docs.microsoft.com\/ef\/\">docs.microsoft.com\/ef\/<\/a>.<\/p>\n<p>Please file issues found and any other feedback on the <a href=\"https:\/\/github.com\/dotnet\/efcore\">dotnet\/efcore GitHub repo<\/a>.<\/p>\n<h2>Helpful links<\/h2>\n<p>The following links are provided for easy reference and access.<\/p>\n<p>EF Core Community Standup Playlist:<\/p>\n<p><a href=\"https:\/\/aka.ms\/efstandups\">https:\/\/aka.ms\/efstandups<\/a><\/p>\n<p>Main documentation:<\/p>\n<p><a href=\"https:\/\/aka.ms\/efdocs\">https:\/\/aka.ms\/efdocs<\/a><\/p>\n<p>Issues and feature requests for EF Core:<\/p>\n<p><a href=\"https:\/\/aka.ms\/efcorefeedback\">https:\/\/aka.ms\/efcorefeedback<\/a><\/p>\n<p>Entity Framework Roadmap:<\/p>\n<p><a href=\"https:\/\/aka.ms\/efroadmap\">https:\/\/aka.ms\/efroadmap<\/a><\/p>\n<p>Bi-weekly updates:\nhttps:\/\/github.com\/dotnet\/efcore\/issues\/27185<\/p>\n<h2>Thank you from the team<\/h2>\n<p>A big thank you from the EF team to everyone who has used and contributed to EF over the years!<\/p>\n<p>Welcome to EF7.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Announcing the release of EF7 Preview 1, the first preview of the new Entity Framework Core.<\/p>\n","protected":false},"author":368,"featured_media":38814,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[685,859],"tags":[4,9,30,7265,70,71],"class_list":["post-38813","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet","category-entity-framework","tag-net","tag-net-core","tag-announcement","tag-announcements","tag-entity-framework","tag-entity-framework-core"],"acf":[],"blog_post_summary":"<p>Announcing the release of EF7 Preview 1, the first preview of the new Entity Framework Core.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/38813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/368"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=38813"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/38813\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/38814"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=38813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=38813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=38813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}