diff --git a/entity-framework/core/cli/dbcontext-creation.md b/entity-framework/core/cli/dbcontext-creation.md index 12c5054189..ff70bff66a 100644 --- a/entity-framework/core/cli/dbcontext-creation.md +++ b/entity-framework/core/cli/dbcontext-creation.md @@ -42,7 +42,7 @@ Both [!IMPORTANT] > Xamarin.Android, Xamarin.iOS, Xamarin.Mac are now integrated directly into .NET (starting with .NET 6) as .NET for Android, .NET for iOS, and .NET for macOS. If you're building with these project types today, they should be upgraded to .NET SDK-style projects for continued support. For more information about upgrading Xamarin projects to .NET, see the [Upgrade from Xamarin to .NET & .NET MAUI](/dotnet/maui/migration) documentation. -Why is a dummy project required? As mentioned earlier, the tools have to execute application code at design time. To do that, they need to use the .NET Core runtime. When the EF Core model is in a project that targets .NET Core or .NET Framework, the EF Core tools borrow the runtime from the project. They can't do that if the EF Core model is in a .NET Standard class library. The .NET Standard is not an actual .NET implementation; it's a specification of a set of APIs that .NET implementations must support. Therefore .NET Standard is not sufficient for the EF Core tools to execute application code. The dummy project you create to use as startup project provides a concrete target platform into which the tools can load the .NET Standard class library. +Why is a dummy project required? As mentioned earlier, the tools have to execute application code at design time. To do that, they need to use the .NET runtime. When the EF Core model is in a project that targets .NET or .NET Framework, the EF Core tools borrow the runtime from the project. They can't do that if the EF Core model is in a .NET Standard class library. The .NET Standard is not an actual .NET implementation; it's a specification of a set of APIs that .NET implementations must support. Therefore .NET Standard is not sufficient for the EF Core tools to execute application code. The dummy project you create to use as startup project provides a concrete target platform into which the tools can load the .NET Standard class library. ### ASP.NET Core environment diff --git a/entity-framework/core/cli/index.md b/entity-framework/core/cli/index.md index 9659344157..95d1d226c7 100644 --- a/entity-framework/core/cli/index.md +++ b/entity-framework/core/cli/index.md @@ -14,7 +14,7 @@ Either of the following tools can be installed, as both tools expose the same fu * The [EF Core Package Manager Console tools](xref:core/cli/powershell) run in the [Package Manager Console](/nuget/tools/package-manager-console) in Visual Studio. We recommend using these tools if you are developing in Visual Studio as they provide a more integrated experience. -* The [EF Core .NET command-line interface (CLI) tools](xref:core/cli/dotnet) are an extension to the cross-platform [.NET Core CLI tools](/dotnet/core/tools/). These tools require a .NET Core SDK project (one with `Sdk="Microsoft.NET.Sdk"` or similar in the project file). +* The [EF Core .NET command-line interface (CLI) tools](xref:core/cli/dotnet) are an extension to the cross-platform [.NET CLI tools](/dotnet/core/tools/). These tools require a .NET SDK project (one with `Sdk="Microsoft.NET.Sdk"` or similar in the project file). ## Next steps diff --git a/entity-framework/core/cli/powershell.md b/entity-framework/core/cli/powershell.md index ee81e35644..b48633eca8 100644 --- a/entity-framework/core/cli/powershell.md +++ b/entity-framework/core/cli/powershell.md @@ -7,9 +7,9 @@ uid: core/cli/powershell --- # Entity Framework Core tools reference - Package Manager Console in Visual Studio -The Package Manager Console (PMC) tools for Entity Framework Core perform design-time development tasks. For example, they create [migrations](/aspnet/core/data/ef-mvc/migrations), apply migrations, and generate code for a model based on an existing database. The commands run inside of Visual Studio using the [Package Manager Console](/nuget/tools/package-manager-console). These tools work with both .NET Framework and .NET Core projects. +The Package Manager Console (PMC) tools for Entity Framework Core perform design-time development tasks. For example, they create [migrations](/aspnet/core/data/ef-mvc/migrations), apply migrations, and generate code for a model based on an existing database. The commands run inside of Visual Studio using the [Package Manager Console](/nuget/tools/package-manager-console). These tools work with both .NET Framework and .NET projects. -If you aren't using Visual Studio, we recommend the [EF Core Command-line Tools](xref:core/cli/dotnet) instead. The .NET Core CLI tools are cross-platform and run inside a command prompt. +If you aren't using Visual Studio, we recommend the [EF Core Command-line Tools](xref:core/cli/dotnet) instead. The .NET CLI tools are cross-platform and run inside a command prompt. [!INCLUDE [managed-identities-test-non-production](~/core/includes/managed-identities-test-non-production.md)] @@ -73,19 +73,19 @@ The commands refer to a *project* and a *startup project*. The startup project and target project are often the same project. A typical scenario where they are separate projects is when: -* The EF Core context and entity classes are in a .NET Core class library. -* A .NET Core console app or web app references the class library. +* The EF Core context and entity classes are in a .NET class library. +* A .NET console app or web app references the class library. It's also possible to [put migrations code in a class library separate from the EF Core context](xref:core/managing-schemas/migrations/projects). ### Other target frameworks -The Package Manager Console tools work with .NET Core or .NET Framework projects. Apps that have the EF Core model in a .NET Standard class library might not have a .NET Core or .NET Framework project. For example, this is true of Xamarin and Universal Windows Platform apps. In such cases, you can create a .NET Core or .NET Framework console app project whose only purpose is to act as startup project for the tools. The project can be a dummy project with no real code — it is only needed to provide a target for the tooling. +The Package Manager Console tools work with .NET or .NET Framework projects. Apps that have the EF Core model in a .NET Standard class library might not have a .NET or .NET Framework project. For example, this is true of Xamarin and Universal Windows Platform apps. In such cases, you can create a .NET or .NET Framework console app project whose only purpose is to act as startup project for the tools. The project can be a dummy project with no real code — it is only needed to provide a target for the tooling. > [!IMPORTANT] > Xamarin.Android, Xamarin.iOS, Xamarin.Mac are now integrated directly into .NET (starting with .NET 6) as .NET for Android, .NET for iOS, and .NET for macOS. If you're building with these project types today, they should be upgraded to .NET SDK-style projects for continued support. For more information about upgrading Xamarin projects to .NET, see the [Upgrade from Xamarin to .NET & .NET MAUI](/dotnet/maui/migration) documentation. -Why is a dummy project required? As mentioned earlier, the tools have to execute application code at design time. To do that, they need to use the .NET Core or .NET Framework runtime. When the EF Core model is in a project that targets .NET Core or .NET Framework, the EF Core tools borrow the runtime from the project. They can't do that if the EF Core model is in a .NET Standard class library. The .NET Standard is not an actual .NET implementation; it's a specification of a set of APIs that .NET implementations must support. Therefore .NET Standard is not sufficient for the EF Core tools to execute application code. The dummy project you create to use as startup project provides a concrete target platform into which the tools can load the .NET Standard class library. +Why is a dummy project required? As mentioned earlier, the tools have to execute application code at design time. To do that, they need to use the .NET or .NET Framework runtime. When the EF Core model is in a project that targets .NET or .NET Framework, the EF Core tools borrow the runtime from the project. They can't do that if the EF Core model is in a .NET Standard class library. The .NET Standard is not an actual .NET implementation; it's a specification of a set of APIs that .NET implementations must support. Therefore .NET Standard is not sufficient for the EF Core tools to execute application code. The dummy project you create to use as startup project provides a concrete target platform into which the tools can load the .NET Standard class library. ### ASP.NET Core environment diff --git a/entity-framework/core/get-started/overview/first-app.md b/entity-framework/core/get-started/overview/first-app.md index 97dc342aa3..d3e47e7a07 100644 --- a/entity-framework/core/get-started/overview/first-app.md +++ b/entity-framework/core/get-started/overview/first-app.md @@ -8,7 +8,7 @@ uid: core/get-started/overview/first-app # Getting Started with EF Core -In this tutorial, you create a .NET Core console app that performs data access against a SQLite database using Entity Framework Core. +In this tutorial, you create a .NET console app that performs data access against a SQLite database using Entity Framework Core. You can follow the tutorial by using Visual Studio on Windows, or by using the .NET CLI on Windows, macOS, or Linux. @@ -51,7 +51,7 @@ cd EFGetStarted To install EF Core, you install the package for the EF Core database provider(s) you want to target. This tutorial uses SQLite because it runs on all platforms that .NET supports. For a list of available providers, see [Database Providers](xref:core/providers/index). -### [.NET Core CLI](#tab/netcore-cli) +### [.NET CLI](#tab/netcore-cli) ```dotnetcli dotnet add package Microsoft.EntityFrameworkCore.Sqlite diff --git a/entity-framework/core/get-started/overview/install.md b/entity-framework/core/get-started/overview/install.md index 68696afa78..5c5bcbfc7a 100644 --- a/entity-framework/core/get-started/overview/install.md +++ b/entity-framework/core/get-started/overview/install.md @@ -18,11 +18,11 @@ uid: core/get-started/overview/install EF Core is shipped as [NuGet packages](https://www.nuget.org/). To add EF Core to an application, install the NuGet package for the database provider you want to use. See [_Providers_](xref:core/providers/index) for a list of the database providers available. -To install or update NuGet packages, you can use the .NET Core command-line interface (CLI), the Visual Studio Package Manager Dialog, or the Visual Studio Package Manager Console. +To install or update NuGet packages, you can use the .NET command-line interface (CLI), the Visual Studio Package Manager Dialog, or the Visual Studio Package Manager Console. -### .NET Core CLI +### .NET CLI -* Use the following .NET Core CLI command from the operating system's command line to install or update the EF Core SQL Server provider: +* Use the following .NET CLI command from the operating system's command line to install or update the EF Core SQL Server provider: ```dotnetcli dotnet add package Microsoft.EntityFrameworkCore.SqlServer @@ -64,15 +64,15 @@ You can install tools to carry out EF Core-related tasks in your project, like c Two sets of tools are available: -* The [.NET Core command-line interface (CLI) tools](xref:core/cli/dotnet) can be used on Windows, Linux, or macOS. These commands begin with `dotnet ef`. +* The [.NET command-line interface (CLI) tools](xref:core/cli/dotnet) can be used on Windows, Linux, or macOS. These commands begin with `dotnet ef`. * The [Package Manager Console (PMC) tools](xref:core/cli/powershell) run in Visual Studio on Windows. These commands start with a verb, for example `Add-Migration`, `Update-Database`. -### Get the .NET Core CLI tools +### Get the .NET CLI tools -.NET Core CLI tools require the .NET Core SDK, mentioned earlier in [Prerequisites](#prerequisites). +.NET CLI tools require the .NET SDK, mentioned earlier in [Prerequisites](#prerequisites). * `dotnet ef` must be installed as a global or local tool. Most developers prefer installing `dotnet ef` as a global tool using the following command: diff --git a/entity-framework/core/get-started/wpf.md b/entity-framework/core/get-started/wpf.md index 1f476bc6ba..3d06ae909c 100644 --- a/entity-framework/core/get-started/wpf.md +++ b/entity-framework/core/get-started/wpf.md @@ -25,7 +25,7 @@ You need to have Visual Studio 2019 16.3 or later installed with the **.NET desk 1. Open Visual Studio 2. On the start window, choose **Create new project**. -3. Search for "WPF," choose **WPF App (.NET Core)** and then choose **Next**. +3. Search for "WPF," choose **WPF App (.NET)** and then choose **Next**. 4. At the next screen, give the project a name, for example, **GetStartedWPF**, and choose **Create.** ## Install the Entity Framework NuGet packages diff --git a/entity-framework/core/learn-more/community-standups.md b/entity-framework/core/learn-more/community-standups.md index 8b0d8a00ac..dcb85065c6 100644 --- a/entity-framework/core/learn-more/community-standups.md +++ b/entity-framework/core/learn-more/community-standups.md @@ -828,7 +828,7 @@ Links: ### Aug 10: [CoreWCF: Roadmap and Q&A](https://www.youtube.com/live/OvaYdycmb-U?si=ucnqZXAoXDSCMZqE) -CoreWCF is a port of the service side of Windows Communication Foundation (WCF) to .NET Core. The goal of this project is to enable existing WCF services to move to .NET Core. The CoreWCF team recently conducted a survey and will be talking about some of the responses, answering questions, and sharing insights into their roadmap for the future. +CoreWCF is a port of the service side of Windows Communication Foundation (WCF) to .NET. The goal of this project is to enable existing WCF services to move to .NET. The CoreWCF team recently conducted a survey and will be talking about some of the responses, answering questions, and sharing insights into their roadmap for the future. Featuring: @@ -1709,7 +1709,7 @@ Links: ### Sep 30: [Geographic Data with NetTopologySuite](https://www.youtube.com/live/IHslY5rrxD0?si=QpNNSZql1UsydmHz) -Joe Amenta joins us to discuss how to add spatial data to your applications to open a world of new relationships between data. He will demonstrate the "status quote" for querying spatial data from .NET Core and demo integrations with NetTopologSuite and EF Core. +Joe Amenta joins us to discuss how to add spatial data to your applications to open a world of new relationships between data. He will demonstrate the "status quote" for querying spatial data from .NET and demo integrations with NetTopologSuite and EF Core. Featuring: @@ -1790,7 +1790,7 @@ Links: ### Aug 5: [EF Core In Depth Video Series](https://www.youtube.com/live/b-zTazj2vuI?si=A9lCvvHva3AomWe7) -Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET Core, Languages, CLI, MSBuild, and more. +Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET, Languages, CLI, MSBuild, and more. Featuring: @@ -1813,7 +1813,7 @@ Links: ### Jul 22: [Using Scaffolding with Handlebars](https://www.youtube.com/live/6Ux7EpgiWXE?si=78XhoFrViXVkMXOL) -Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET Core, Languages, CLI, MSBuild, and more. +Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET, Languages, CLI, MSBuild, and more. Featuring: @@ -1839,7 +1839,7 @@ Links: ### Jun 24: [EF Core in Blazor](https://www.youtube.com/live/HNJYIqeBLQc?si=xvEObLRdY37_0L87) -Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET Core, Languages, CLI, MSBuild, and more. +Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET, Languages, CLI, MSBuild, and more. Featuring: @@ -1861,7 +1861,7 @@ Links: ### Jun 10: [EF Core Power Tools](https://www.youtube.com/live/OWuP_qOYwsk?si=VoSGWW6CfR8-x46P) -Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET Core, Languages, CLI, MSBuild, and more. +Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET, Languages, CLI, MSBuild, and more. Featuring: @@ -1881,7 +1881,7 @@ Links: ### May 6: [Introducing the EF Core Community Standup](https://www.youtube.com/live/j1sGgfCxhp0?si=VQBMex-9-me9JhAB) -Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET Core, Languages, CLI, MSBuild, and more. +Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET, Languages, CLI, MSBuild, and more. Featuring: diff --git a/entity-framework/core/managing-schemas/migrations/applying.md b/entity-framework/core/managing-schemas/migrations/applying.md index b05fa4f460..c51ab48a20 100644 --- a/entity-framework/core/managing-schemas/migrations/applying.md +++ b/entity-framework/core/managing-schemas/migrations/applying.md @@ -21,7 +21,7 @@ The recommended way to deploy migrations to a production database is by generati * SQL scripts can be used in conjunction with a deployment technology, and can even be generated as part of your CI process. * SQL scripts can be provided to a DBA, and can be managed and archived separately. -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) #### Basic Usage @@ -96,7 +96,7 @@ The SQL scripts generated above can only be applied to change your schema from o The following generates idempotent migrations: -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef migrations script --idempotent @@ -117,7 +117,7 @@ The EF command-line tools can be used to apply migrations to a database. While p * The SQL commands are applied directly by the tool, without giving the developer a chance to inspect or modify them. This can be dangerous in a production environment. * The .NET SDK and the EF tool must be installed on production servers and requires the project's source code. -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) The following updates your database to the latest migration: @@ -168,7 +168,7 @@ Migration bundles are single-file executables that can be used to apply migratio * Bundles can be generated as part of your CI process and easily executed later as part of your deployment process. * Bundles can be executed without installing the .NET SDK or EF Tool (or even the .NET Runtime, when self-contained), and they don't require the project's source code. -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) The following generates a bundle: diff --git a/entity-framework/core/managing-schemas/migrations/index.md b/entity-framework/core/managing-schemas/migrations/index.md index e6d4bd5ff4..7f8cbde524 100644 --- a/entity-framework/core/managing-schemas/migrations/index.md +++ b/entity-framework/core/managing-schemas/migrations/index.md @@ -34,14 +34,14 @@ During development, you may have used the [Create and Drop APIs](xref:core/manag First, you'll have to install the [EF Core command-line tools](xref:core/cli/index): -* We generally recommend using the [.NET Core CLI tools](xref:core/cli/dotnet), which work on all platforms. +* We generally recommend using the [.NET CLI tools](xref:core/cli/dotnet), which work on all platforms. * If you're more comfortable working inside Visual Studio or have experience with EF6 migrations, you can also use the [Package Manager Console tools](xref:core/cli/powershell). ### Create your first migration You're now ready to add your first migration! Instruct EF Core to create a migration named **InitialCreate**: -#### [.NET Core CLI](#tab/dotnet-core-cli) +#### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef migrations add InitialCreate @@ -61,7 +61,7 @@ EF Core will create a directory called **Migrations** in your project, and gener At this point you can have EF create your database and create your schema from the migration. This can be done via the following: -#### [.NET Core CLI](#tab/dotnet-core-cli) +#### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef database update @@ -92,7 +92,7 @@ public class Blog Your model and your production database are now out of sync - we must add a new column to your database schema. Let's create a new migration for this: -#### [.NET Core CLI](#tab/dotnet-core-cli) +#### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef migrations add AddBlogCreatedTimestamp @@ -114,7 +114,7 @@ You can now apply your migration as before: -#### [.NET Core CLI](#tab/dotnet-core-cli) +#### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef database update @@ -140,10 +140,10 @@ Sometimes you may want to reference types from another DbContext. This can lead ### Next steps -The above was only a brief introduction to migrations. Please consult the other documentation pages to learn more about [managing migrations](xref:core/managing-schemas/migrations/managing), [applying them](xref:core/managing-schemas/migrations/applying), and other aspects. The [.NET Core CLI tool reference](xref:core/cli/index) also contains useful information on the different commands +The above was only a brief introduction to migrations. Please consult the other documentation pages to learn more about [managing migrations](xref:core/managing-schemas/migrations/managing), [applying them](xref:core/managing-schemas/migrations/applying), and other aspects. The [.NET CLI tool reference](xref:core/cli/index) also contains useful information on the different commands ## Additional resources -* [Entity Framework Core tools reference - .NET Core CLI](xref:core/cli/dotnet) : Includes commands to update, drop, add, remove, and more. +* [Entity Framework Core tools reference - .NET CLI](xref:core/cli/dotnet) : Includes commands to update, drop, add, remove, and more. * [Entity Framework Core tools reference - Package Manager Console in Visual Studio](xref:core/cli/powershell) : Includes commands to update, drop, add, remove, and more. * [.NET Data Community Standup session](https://www.youtube.com/watch?v=mSsGERmrhnE&list=PLdo4fOcmZ0oX-DBuRG4u58ZTAJgBAeQ-t&index=20) going over new migration features in EF Core 5.0. diff --git a/entity-framework/core/managing-schemas/migrations/managing.md b/entity-framework/core/managing-schemas/migrations/managing.md index 0d576e97a9..23d3da2a5f 100644 --- a/entity-framework/core/managing-schemas/migrations/managing.md +++ b/entity-framework/core/managing-schemas/migrations/managing.md @@ -10,13 +10,13 @@ uid: core/managing-schemas/migrations/managing As your model changes, migrations are added and removed as part of normal development, and the migration files are checked into your project's source control. To manage migrations, you must first install the [EF Core command-line tools](xref:core/cli/index). > [!TIP] -> If the `DbContext` is in a different assembly than the startup project, you can explicitly specify the target and startup projects in either the [Package Manager Console tools](xref:core/cli/powershell#target-and-startup-project) or the [.NET Core CLI tools](xref:core/cli/dotnet#target-project-and-startup-project). +> If the `DbContext` is in a different assembly than the startup project, you can explicitly specify the target and startup projects in either the [Package Manager Console tools](xref:core/cli/powershell#target-and-startup-project) or the [.NET CLI tools](xref:core/cli/dotnet#target-project-and-startup-project). ## Add a migration After your model has been changed, you can add a migration for that change: -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef migrations add AddBlogCreatedTimestamp @@ -44,7 +44,7 @@ The timestamp in the filename helps keep them ordered chronologically so you can You are free to move Migrations files and change their namespace manually. New migrations are created as siblings of the last migration. Alternatively, you can specify the directory at generation time as follows: -#### [.NET Core CLI](#tab/dotnet-core-cli) +#### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef migrations add InitialCreate --output-dir Your/Directory @@ -170,7 +170,7 @@ In most cases, EF Core will automatically wrap each migration in its own transac Sometimes you add a migration and realize you need to make additional changes to your EF Core model before applying it. To remove the last migration, use this command. -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef migrations remove @@ -193,7 +193,7 @@ After removing the migration, you can make the additional model changes and add You can list all existing migrations as follows: -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef migrations list @@ -242,5 +242,5 @@ VALUES (N'', N''); ## Additional resources -* [Entity Framework Core tools reference - .NET Core CLI](xref:core/cli/dotnet) : Includes commands to update, drop, add, remove, and more. +* [Entity Framework Core tools reference - .NET CLI](xref:core/cli/dotnet) : Includes commands to update, drop, add, remove, and more. * [Entity Framework Core tools reference - Package Manager Console in Visual Studio](xref:core/cli/powershell) : Includes commands to update, drop, add, remove, and more. diff --git a/entity-framework/core/managing-schemas/migrations/projects.md b/entity-framework/core/managing-schemas/migrations/projects.md index 2f8fcc7b83..4ea010ee6d 100644 --- a/entity-framework/core/managing-schemas/migrations/projects.md +++ b/entity-framework/core/managing-schemas/migrations/projects.md @@ -46,7 +46,7 @@ You may want to store your migrations in a different project than the one contai If you did everything correctly, you should be able to add new migrations to the project. -## [.NET Core CLI](#tab/dotnet-core-cli) +## [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef migrations add NewMigration --project WebApplication1.Migrations diff --git a/entity-framework/core/managing-schemas/migrations/providers.md b/entity-framework/core/managing-schemas/migrations/providers.md index c3640088ca..df3af9cf2c 100644 --- a/entity-framework/core/managing-schemas/migrations/providers.md +++ b/entity-framework/core/managing-schemas/migrations/providers.md @@ -23,7 +23,7 @@ class SqliteBlogContext : BlogContext Specify the context type when adding new migrations. -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef migrations add InitialCreate --context BlogContext --output-dir Migrations/SqlServerMigrations @@ -58,7 +58,7 @@ Here's one pattern that works well when using a [Generic Host](/dotnet/core/exte Since the default host builder reads configuration from command-line arguments, you can specify the provider when running the tools. -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef migrations add MyMigration --project ../SqlServerMigrations -- --provider SqlServer diff --git a/entity-framework/core/managing-schemas/scaffolding/index.md b/entity-framework/core/managing-schemas/scaffolding/index.md index 04ef575ecb..56f11947b5 100644 --- a/entity-framework/core/managing-schemas/scaffolding/index.md +++ b/entity-framework/core/managing-schemas/scaffolding/index.md @@ -201,7 +201,7 @@ public partial class post ### Use mapping attributes (aka Data Annotations) -Entity types are configured using the [`ModelBuilder` API in `OnModelCreating`](xref:core/modeling/index#use-fluent-api-to-configure-a-model) by default. Specify `-DataAnnotations` (PMC) or `--data-annotations` (.NET Core CLI) to instead use [mapping attributes](xref:core/modeling/index#use-data-annotations-to-configure-a-model) when possible. +Entity types are configured using the [`ModelBuilder` API in `OnModelCreating`](xref:core/modeling/index#use-fluent-api-to-configure-a-model) by default. Specify `-DataAnnotations` (PMC) or `--data-annotations` (.NET CLI) to instead use [mapping attributes](xref:core/modeling/index#use-data-annotations-to-configure-a-model) when possible. For example, using the Fluent API will scaffold this: @@ -224,7 +224,7 @@ public string Title { get; set; } ### DbContext name -The scaffolded `DbContext` class name will be the name of the database suffixed with _Context_ by default. To specify a different one, use `-Context` in PMC and `--context` in the .NET Core CLI. +The scaffolded `DbContext` class name will be the name of the database suffixed with _Context_ by default. To specify a different one, use `-Context` in PMC and `--context` in the .NET CLI. ### Target directories and namespaces diff --git a/entity-framework/core/managing-schemas/scaffolding/templates.md b/entity-framework/core/managing-schemas/scaffolding/templates.md index 227c4197ef..c7499a0e00 100644 --- a/entity-framework/core/managing-schemas/scaffolding/templates.md +++ b/entity-framework/core/managing-schemas/scaffolding/templates.md @@ -120,7 +120,7 @@ var usings = new List Test the changes by using the reverse engineering commands. The templates inside your project are used automatically by the commands. -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef dbcontext scaffold "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Chinook" Microsoft.EntityFrameworkCore.SqlServer diff --git a/entity-framework/core/miscellaneous/connection-strings.md b/entity-framework/core/miscellaneous/connection-strings.md index 37f6ffa289..8340bc4df1 100644 --- a/entity-framework/core/miscellaneous/connection-strings.md +++ b/entity-framework/core/miscellaneous/connection-strings.md @@ -37,7 +37,7 @@ dotnet user-secrets set ConnectionStrings:YourDatabaseAlias "Data Source=(locald Then, in scaffolding, use a connection string that consists of `Name=`. -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet ef dbcontext scaffold Name=ConnectionStrings:YourDatabaseAlias Microsoft.EntityFrameworkCore.SqlServer diff --git a/entity-framework/core/miscellaneous/platforms.md b/entity-framework/core/miscellaneous/platforms.md index 19bfafdcb0..43a590cc1f 100644 --- a/entity-framework/core/miscellaneous/platforms.md +++ b/entity-framework/core/miscellaneous/platforms.md @@ -13,7 +13,7 @@ We want EF Core to be available to developers on all modern .NET implementations Several older .NET implementations are no longer supported. See the sections below for more guidance. | EF Core | .NET & .NET Core | .NET Standard | .NET Framework | -|-------------------|------------------|---------------|----------------| +|------------------ | ---------------- | ------------- | -------------- | | **9.0** | 8.0 | | | | **8.0** | 8.0 | | | | ~~**7.0**~~ (EOL) | 6.0 | | | diff --git a/entity-framework/core/providers/cosmos/index.md b/entity-framework/core/providers/cosmos/index.md index 8c8edd4640..fd560934af 100644 --- a/entity-framework/core/providers/cosmos/index.md +++ b/entity-framework/core/providers/cosmos/index.md @@ -21,7 +21,7 @@ It is strongly recommended to familiarize yourself with the [Azure Cosmos DB doc Install the [Microsoft.EntityFrameworkCore.Cosmos NuGet package](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Cosmos/). -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet add package Microsoft.EntityFrameworkCore.Cosmos diff --git a/entity-framework/core/providers/in-memory/index.md b/entity-framework/core/providers/in-memory/index.md index b2dcd67d32..645798c692 100644 --- a/entity-framework/core/providers/in-memory/index.md +++ b/entity-framework/core/providers/in-memory/index.md @@ -19,7 +19,7 @@ This database provider allows Entity Framework Core to be used with an in-memory Install the [Microsoft.EntityFrameworkCore.InMemory NuGet package](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.InMemory/). -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet add package Microsoft.EntityFrameworkCore.InMemory diff --git a/entity-framework/core/providers/index.md b/entity-framework/core/providers/index.md index bdbf2735ad..ab4f846b38 100644 --- a/entity-framework/core/providers/index.md +++ b/entity-framework/core/providers/index.md @@ -67,7 +67,7 @@ Entity Framework Core can access many different databases through plug-in librar Most database providers for EF Core are distributed as NuGet packages, and can be installed as follows: -## [.NET Core CLI](#tab/dotnet-core-cli) +## [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet add package provider_package_name diff --git a/entity-framework/core/providers/sql-server/hierarchyid.md b/entity-framework/core/providers/sql-server/hierarchyid.md index 8e30175303..a306e2d003 100644 --- a/entity-framework/core/providers/sql-server/hierarchyid.md +++ b/entity-framework/core/providers/sql-server/hierarchyid.md @@ -31,7 +31,7 @@ At the next level, a new [Microsoft.EntityFrameworkCore.SqlServer.Abstractions]( Use of `HierarchyId` for EF Core functionality such as queries and updates requires the [Microsoft.EntityFrameworkCore.SqlServer.HierarchyId](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer.HierarchyId) package. This package brings in `Microsoft.EntityFrameworkCore.SqlServer.Abstractions` and `Microsoft.SqlServer.Types` as transitive dependencies, and so is often the only package needed. -### [.NET Core CLI](#tab/netcore-cli) +### [.NET CLI](#tab/netcore-cli) ```dotnetcli dotnet add package Microsoft.EntityFrameworkCore.SqlServer.HierarchyId diff --git a/entity-framework/core/providers/sql-server/index.md b/entity-framework/core/providers/sql-server/index.md index 8e7f08d04d..b73f82281d 100644 --- a/entity-framework/core/providers/sql-server/index.md +++ b/entity-framework/core/providers/sql-server/index.md @@ -13,7 +13,7 @@ This database provider allows Entity Framework Core to be used with Microsoft SQ Install the [Microsoft.EntityFrameworkCore.SqlServer NuGet package](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer/). -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet add package Microsoft.EntityFrameworkCore.SqlServer diff --git a/entity-framework/core/providers/sqlite/index.md b/entity-framework/core/providers/sqlite/index.md index 0d30b325b3..756a6e4a0e 100644 --- a/entity-framework/core/providers/sqlite/index.md +++ b/entity-framework/core/providers/sqlite/index.md @@ -13,7 +13,7 @@ This database provider allows Entity Framework Core to be used with SQLite. The Install the [Microsoft.EntityFrameworkCore.Sqlite NuGet package](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Sqlite/). -### [.NET Core CLI](#tab/dotnet-core-cli) +### [.NET CLI](#tab/dotnet-core-cli) ```dotnetcli dotnet add package Microsoft.EntityFrameworkCore.Sqlite diff --git a/entity-framework/core/what-is-new/ef-core-10.0/whatsnew.md b/entity-framework/core/what-is-new/ef-core-10.0/whatsnew.md index 36486d1499..a42ef09869 100644 --- a/entity-framework/core/what-is-new/ef-core-10.0/whatsnew.md +++ b/entity-framework/core/what-is-new/ef-core-10.0/whatsnew.md @@ -152,7 +152,7 @@ See [#12793](https://github.com/dotnet/efcore/issues/12793) and [#35367](https:/ - Optimize use of `Count` operation on `ICollection` ([#35381](https://github.com/dotnet/efcore/pull/35381), contributed by [@ChrisJollyAU](https://github.com/ChrisJollyAU)). - Optimize `MIN`/`MAX` over `DISTINCT` ([#34699](https://github.com/dotnet/efcore/pull/34699), contributed by [@ranma42](https://github.com/ranma42)). - Translate date/time functions using `DatePart.Microsecond` and `DatePart.Nanosecond` arguments ([#34861](https://github.com/dotnet/efcore/pull/34861)). -- Simplify parameter names (e.g. from `@__city_0` to `city`) ([#35200](https://github.com/dotnet/efcore/pull/35200)). +- Simplify parameter names (e.g. from `@__city_0` to `@city`) ([#35200](https://github.com/dotnet/efcore/pull/35200)). - Translate `COALESCE` as `ISNULL` on SQL Server, for most cases ([#34171](https://github.com/dotnet/efcore/pull/34171), contributed by [@ranma42](https://github.com/ranma42)). - Support some string functions taking `char` as arguments ([#34999](https://github.com/dotnet/efcore/pull/34999), contributed by [@ChrisJollyAU](https://github.com/ChrisJollyAU)). - Support `MAX`/`MIN`/`ORDER BY` using `decimal` on SQLite ([#35606](https://github.com/dotnet/efcore/pull/35606), contributed by [@ranma42](https://github.com/ranma42)). diff --git a/entity-framework/core/what-is-new/ef-core-3.x/index.md b/entity-framework/core/what-is-new/ef-core-3.x/index.md index ea7d0e2086..0adda59be7 100644 --- a/entity-framework/core/what-is-new/ef-core-3.x/index.md +++ b/entity-framework/core/what-is-new/ef-core-3.x/index.md @@ -188,7 +188,7 @@ public class OrderDetails This isn't really an EF Core 3.x feature, but we think it is important to many of our current customers. -We understand that many existing applications use previous versions of EF, and that porting them to EF Core only to take advantage of .NET Core can require a significant effort. +We understand that many existing applications use previous versions of EF, and that porting them to EF Core only to take advantage of .NET can require a significant effort. For that reason, we decided to port the newest version of EF 6 to run on .NET Core 3.x. For more details, see [what's new in EF 6](xref:ef6/what-is-new/index). diff --git a/entity-framework/core/what-is-new/ef-core-6.0/plan.md b/entity-framework/core/what-is-new/ef-core-6.0/plan.md index ff759c7ae5..4e792f5e57 100644 --- a/entity-framework/core/what-is-new/ef-core-6.0/plan.md +++ b/entity-framework/core/what-is-new/ef-core-6.0/plan.md @@ -312,7 +312,7 @@ Status: In-progress T-shirt size: Ongoing -[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/) is a fully-featured ADO.NET database provider for SQL Server. It supports a broad range of SQL Server features on both .NET Core and .NET Framework. However, it is also a large and old codebase with many complex interactions between its behaviors. This makes it difficult to investigate the potential gains the could be made using newer .NET Core features. Therefore, we are starting an experiment in collaboration with the community to determine what potential there is for a highly performing SQL Server driver for .NET. +[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/) is a fully-featured ADO.NET database provider for SQL Server. It supports a broad range of SQL Server features on both .NET and .NET Framework. However, it is also a large and old codebase with many complex interactions between its behaviors. This makes it difficult to investigate the potential gains the could be made using newer .NET features. Therefore, we are starting an experiment in collaboration with the community to determine what potential there is for a highly performing SQL Server driver for .NET. > [!IMPORTANT] > Investment in Microsoft.Data.SqlClient is not changing. It will continue to be the recommended way to connect to SQL Server and SQL Azure, both with and without EF Core. It will continue to support new SQL Server features as they are introduced. diff --git a/entity-framework/core/what-is-new/ef-core-7.0/plan.md b/entity-framework/core/what-is-new/ef-core-7.0/plan.md index a08da6463f..c884ce1487 100644 --- a/entity-framework/core/what-is-new/ef-core-7.0/plan.md +++ b/entity-framework/core/what-is-new/ef-core-7.0/plan.md @@ -168,7 +168,7 @@ Tracked in the [.NET Data Lab repo](https://github.com/dotnet/datalab/) Value proposition: Fast, fully managed access to SQL Server and Azure SQL for modern .NET applications. -[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/) is a fully-featured ADO.NET database provider for SQL Server. It supports a broad range of SQL Server features on both .NET Core and .NET Framework. However, it is also a large and old codebase with many complex interactions between its behaviors. This makes it difficult to investigate the potential gains that could be made using newer .NET Core features. +[Microsoft.Data.SqlClient](https://www.nuget.org/packages/Microsoft.Data.SqlClient/) is a fully-featured ADO.NET database provider for SQL Server. It supports a broad range of SQL Server features on both .NET and .NET Framework. However, it is also a large and old codebase with many complex interactions between its behaviors. This makes it difficult to investigate the potential gains that could be made using newer .NET features. We began a project last year, colloquially known as "Woodstar", to investigate the potential for a highly performing SQL Server driver for .NET. We plan to make significant further investment into this project in the EF7 timeframe. diff --git a/entity-framework/core/what-is-new/ef-core-8.0/whatsnew.md b/entity-framework/core/what-is-new/ef-core-8.0/whatsnew.md index ddde4a3f15..1d5795b1a5 100644 --- a/entity-framework/core/what-is-new/ef-core-8.0/whatsnew.md +++ b/entity-framework/core/what-is-new/ef-core-8.0/whatsnew.md @@ -1306,7 +1306,7 @@ The database is then able to run queries against this data using its hierarchica ### Support in .NET and EF Core -Official support for the SQL Server `hierarchyid` type has only recently come to modern .NET platforms (i.e. ".NET Core"). This support is in the form of the [Microsoft.SqlServer.Types](https://www.nuget.org/packages/Microsoft.SqlServer.Types) NuGet package, which brings in low-level SQL Server-specific types. In this case, the low-level type is called `SqlHierarchyId`. +Official support for the SQL Server `hierarchyid` type has only recently come to modern .NET platforms. This support is in the form of the [Microsoft.SqlServer.Types](https://www.nuget.org/packages/Microsoft.SqlServer.Types) NuGet package, which brings in low-level SQL Server-specific types. In this case, the low-level type is called `SqlHierarchyId`. At the next level, a new [Microsoft.EntityFrameworkCore.SqlServer.Abstractions](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.SqlServer.Abstractions) package has been introduced, which includes a higher-level `HierarchyId` type intended for use in entity types. diff --git a/entity-framework/core/what-is-new/index.md b/entity-framework/core/what-is-new/index.md index 79d21de8f0..a3aedef25d 100644 --- a/entity-framework/core/what-is-new/index.md +++ b/entity-framework/core/what-is-new/index.md @@ -39,7 +39,7 @@ Entity Framework Core releases and support are aligned with .NET releases and su ## Release planning and schedules -EF Core releases align with the [.NET Core shipping schedule](https://github.com/dotnet/core/blob/main/roadmap.md). +EF Core releases align with the [.NET shipping schedule](https://github.com/dotnet/core/blob/main/roadmap.md). Patch releases usually ship monthly, but have a long lead time. diff --git a/entity-framework/ef6/fundamentals/databinding/wpf.md b/entity-framework/ef6/fundamentals/databinding/wpf.md index 00f7adfee3..755c2025e2 100644 --- a/entity-framework/ef6/fundamentals/databinding/wpf.md +++ b/entity-framework/ef6/fundamentals/databinding/wpf.md @@ -10,7 +10,7 @@ uid: ef6/fundamentals/databinding/wpf > [!IMPORTANT] > **This document is valid for WPF on the .NET Framework only** > -> This document describes databinding for WPF on the .NET Framework. For new .NET Core projects, we recommend you use [EF Core](xref:core/index) instead of Entity Framework 6. The documentation for databinding in EF Core is here: [Getting Started with WPF](xref:core/get-started/wpf). +> This document describes databinding for WPF on the .NET Framework. For new .NET projects, we recommend you use [EF Core](xref:core/index) instead of Entity Framework 6. The documentation for databinding in EF Core is here: [Getting Started with WPF](xref:core/get-started/wpf). This step-by-step walkthrough shows how to bind POCO types to WPF controls in a “master-detail" form. The application uses the Entity Framework APIs to populate objects with data from the database, track changes, and persist data to the database. diff --git a/entity-framework/ef6/what-is-new/index.md b/entity-framework/ef6/what-is-new/index.md index 7c089f652f..2f8ce7a64c 100644 --- a/entity-framework/ef6/what-is-new/index.md +++ b/entity-framework/ef6/what-is-new/index.md @@ -37,7 +37,7 @@ The EF 6.3.0 runtime was released to NuGet in September 2019. The main goal of t ### EF designer support -There's currently no support for using the EF designer directly on .NET Core or .NET Standard projects or on an SDK-style .NET Framework project. +There's currently no support for using the EF designer directly on .NET or .NET Standard projects or on an SDK-style .NET Framework project. You can work around this limitation by adding the EDMX file and the generated classes for the entities and the DbContext as linked files to a .NET Core 3.0 or .NET Standard 2.1 project in the same solution. @@ -52,7 +52,7 @@ The linked files will look like this in the project file: ``` -Note that the EDMX file is linked with the EntityDeploy build action. This is a special MSBuild task (now included in the EF 6.3 package) that takes care of adding the EF model into the target assembly as embedded resources (or copying it as files in the output folder, depending on the Metadata Artifact Processing setting in the EDMX). For more details on how to get this set up, see our [EDMX .NET Core sample](https://aka.ms/EdmxDotNetCoreSample). +Note that the EDMX file is linked with the EntityDeploy build action. This is a special MSBuild task (now included in the EF 6.3 package) that takes care of adding the EF model into the target assembly as embedded resources (or copying it as files in the output folder, depending on the Metadata Artifact Processing setting in the EDMX). For more details on how to get this set up, see our [EDMX .NET sample](https://aka.ms/EdmxDotNetCoreSample). Warning: make sure the old style (i.e. non-SDK-style) .NET Framework project defining the "real" .edmx file comes _before_ the project defining the link inside the .sln file. Otherwise, when you open the .edmx file in the designer, you see the error message "The Entity Framework is not available in the target framework currently specified for the project. You can change the target framework of the project or edit the model in the XmlEditor".