{"id":27685,"date":"2020-04-23T10:17:03","date_gmt":"2020-04-23T17:17:03","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=27685"},"modified":"2020-04-23T11:53:41","modified_gmt":"2020-04-23T18:53:41","slug":"announcing-entity-framework-core-5-0-preview-3","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-entity-framework-core-5-0-preview-3\/","title":{"rendered":"Announcing Entity Framework Core 5.0 Preview 3"},"content":{"rendered":"<p>Today we are excited to announce the third preview release of <a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore\/5.0.0-preview.3.20181.2\">EF Core 5.0<\/a>.<\/p>\n<p>The third previews of <a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-net-5-0-preview-3\/\">.NET 5<\/a> and <a href=\"https:\/\/devblogs.microsoft.com\/aspnet\/asp-net-core-updates-in-net-5-preview-3\/\">ASP.NET Core 5.0<\/a> are also available now.<\/p>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<p>The previews of EF Core 5.0 require .NET Standard 2.1. This means:<\/p>\n<ul>\n<li>EF Core 5.0 runs on .NET Core 3.1; it does not require .NET 5.\n<ul>\n<li>This may change in future previews depending on how the plan for .NET 5 evolves.<\/li>\n<\/ul>\n<\/li>\n<li>EF Core 5.0 runs on other platforms that support <a href=\"https:\/\/docs.microsoft.com\/ef\/core\/platforms\/\">.NET Standard 2.1<\/a>.<\/li>\n<li>EF Core 5.0 will <strong>not<\/strong> run on .NET Standard 2.0 platforms, including .NET Framework.<\/li>\n<\/ul>\n<hr \/>\n<h2 id=\"how-to-get-ef-core-5-0-previews\">How to get EF Core 5.0 previews<\/h2>\n<p>EF Core 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 class=\"prettyprint\">dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 5.0.0-preview.3.20181.2\r\n<\/pre>\n<p>The EF Core packages published today are:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore<\/a> &#8211; The main EF Core package<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.SqlServer\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.SqlServer<\/a> &#8211; Database provider for Microsoft SQL Server and SQL Azure<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Sqlite\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.Sqlite<\/a> &#8211; Database provider for SQLite<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Cosmos\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.Cosmos<\/a> &#8211; Database provider for Azure Cosmos DB<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.InMemory\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.InMemory<\/a> &#8211; The in-memory database provider<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Tools\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.Tools<\/a> &#8211; EF Core PowerShell commands for the Visual Studio Package Manager Console<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Design\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.Design<\/a> &#8211; Shared design-time components for EF Core tools<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite<\/a> &#8211; SQL Server support for spatial types<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite<\/a> &#8211; SQLite support for spatial types<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Proxies\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.Proxies<\/a> &#8211; Lazy-loading and change-tracking proxies<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Abstractions\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.Abstractions<\/a> &#8211; Decoupled EF Core abstractions<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Relational\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.Relational<\/a> &#8211; Shared EF Core components for relational database providers<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Analyzers\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.Analyzers<\/a> &#8211; C# analyzers for EF Core<\/li>\n<li><a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.EntityFrameworkCore.Sqlite.Core\/5.0.0-preview.3.20181.2\">Microsoft.EntityFrameworkCore.Sqlite.Core<\/a> &#8211; Database provider for SQLite without a packaged native binary<\/li>\n<\/ul>\n<p>We have also published the 5.0 preview 3 release of the <a href=\"https:\/\/www.nuget.org\/packages\/Microsoft.Data.Sqlite.Core\/5.0.0-preview.3.20181.2\">Microsoft.Data.Sqlite.Core<\/a> ADO.NET provider.<\/p>\n<h2 id=\"installing-dotnet-ef\">Installing dotnet ef<\/h2>\n<p>As with EF Core 3.0 and 3.1, the dotnet ef command-line tool is no longer included in the .NET Core SDK. Before you can execute EF Core migration or scaffolding commands, you&#8217;ll have to install this package as either a global or local tool.<\/p>\n<p>To install the preview tool globally, first uninstall any existing version with:<\/p>\n<pre class=\"prettyprint\">dotnet tool uninstall --global dotnet-ef\r\n<\/pre>\n<p>Then install with:<\/p>\n<pre class=\"prettyprint\">dotnet tool install --global dotnet-ef --version 5.0.0-preview.3.20181.2\r\n<\/pre>\n<p>It&#8217;s possible to use this new version of dotnet ef with projects that use older versions of the EF Core runtime.<\/p>\n<p><figure class=\"wp-caption alignnone\" >