You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command-line interface (CLI) 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 are an extension to the cross-platform [dotnet](/dotnet/core/tools) command, which is part of the [.NET Core SDK](https://www.microsoft.com/net/core). These tools work with .NET Core projects.
11
+
The command-line interface (CLI) 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 are an extension to the cross-platform [dotnet](/dotnet/core/tools) command, which is part of the [.NET SDK](https://www.microsoft.com/net/core). These tools work with .NET projects.
12
12
13
13
When using Visual Studio, consider using the [Package Manager Console tools](xref:core/cli/powershell) instead of the CLI tools. Package Manager Console tools automatically:
14
14
@@ -80,19 +80,19 @@ The commands refer to a *project* and a *startup project*.
80
80
81
81
The startup project and target project are often the same project. A typical scenario where they are separate projects is when:
82
82
83
-
* The EF Core context and entity classes are in a .NET Core class library.
84
-
* A .NET Core console app or web app references the class library.
83
+
* The EF Core context and entity classes are in a .NET class library.
84
+
* A .NET console app or web app references the class library.
85
85
86
86
It's also possible to [put migrations code in a class library separate from the EF Core context](xref:core/managing-schemas/migrations/projects).
87
87
88
88
### Other target frameworks
89
89
90
-
The CLI tools work with .NET Core projects and .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 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.
90
+
The CLI tools work with .NET projects and .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 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.
91
91
92
92
> [!IMPORTANT]
93
93
> 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.
94
94
95
-
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.
95
+
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.
Copy file name to clipboardExpand all lines: entity-framework/core/cli/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Either of the following tools can be installed, as both tools expose the same fu
14
14
15
15
* 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.
16
16
17
-
* 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).
17
+
* 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).
Copy file name to clipboardExpand all lines: entity-framework/core/cli/powershell.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@ uid: core/cli/powershell
7
7
---
8
8
# Entity Framework Core tools reference - Package Manager Console in Visual Studio
9
9
10
-
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.
10
+
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.
11
11
12
-
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.
12
+
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.
@@ -73,19 +73,19 @@ The commands refer to a *project* and a *startup project*.
73
73
74
74
The startup project and target project are often the same project. A typical scenario where they are separate projects is when:
75
75
76
-
* The EF Core context and entity classes are in a .NET Core class library.
77
-
* A .NET Core console app or web app references the class library.
76
+
* The EF Core context and entity classes are in a .NET class library.
77
+
* A .NET console app or web app references the class library.
78
78
79
79
It's also possible to [put migrations code in a class library separate from the EF Core context](xref:core/managing-schemas/migrations/projects).
80
80
81
81
### Other target frameworks
82
82
83
-
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.
83
+
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.
84
84
85
85
> [!IMPORTANT]
86
86
> 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.
87
87
88
-
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.
88
+
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.
In this tutorial, you create a .NET Core console app that performs data access against a SQLite database using Entity Framework Core.
11
+
In this tutorial, you create a .NET console app that performs data access against a SQLite database using Entity Framework Core.
12
12
13
13
You can follow the tutorial by using Visual Studio on Windows, or by using the .NET CLI on Windows, macOS, or Linux.
14
14
@@ -51,7 +51,7 @@ cd EFGetStarted
51
51
52
52
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).
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.
20
20
21
-
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.
21
+
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.
22
22
23
-
### .NET Core CLI
23
+
### .NET CLI
24
24
25
-
* Use the following .NET Core CLI command from the operating system's command line to install or update the EF Core SQL Server provider:
25
+
* Use the following .NET CLI command from the operating system's command line to install or update the EF Core SQL Server provider:
@@ -64,15 +64,15 @@ You can install tools to carry out EF Core-related tasks in your project, like c
64
64
65
65
Two sets of tools are available:
66
66
67
-
* 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`.
67
+
* 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`.
68
68
69
69
* 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`.
70
70
71
71
<aname="cli"></a>
72
72
73
-
### Get the .NET Core CLI tools
73
+
### Get the .NET CLI tools
74
74
75
-
.NET Core CLI tools require the .NET Core SDK, mentioned earlier in [Prerequisites](#prerequisites).
75
+
.NET CLI tools require the .NET SDK, mentioned earlier in [Prerequisites](#prerequisites).
76
76
77
77
*`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:
Copy file name to clipboardExpand all lines: entity-framework/core/learn-more/community-standups.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -828,7 +828,7 @@ Links:
828
828
829
829
### Aug 10: [CoreWCF: Roadmap and Q&A](https://www.youtube.com/live/OvaYdycmb-U?si=ucnqZXAoXDSCMZqE)
830
830
831
-
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.
831
+
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.
832
832
833
833
Featuring:
834
834
@@ -1709,7 +1709,7 @@ Links:
1709
1709
1710
1710
### Sep 30: [Geographic Data with NetTopologySuite](https://www.youtube.com/live/IHslY5rrxD0?si=QpNNSZql1UsydmHz)
1711
1711
1712
-
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.
1712
+
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.
1713
1713
1714
1714
Featuring:
1715
1715
@@ -1790,7 +1790,7 @@ Links:
1790
1790
1791
1791
### Aug 5: [EF Core In Depth Video Series](https://www.youtube.com/live/b-zTazj2vuI?si=A9lCvvHva3AomWe7)
1792
1792
1793
-
Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET Core, Languages, CLI, MSBuild, and more.
1793
+
Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET, Languages, CLI, MSBuild, and more.
1794
1794
1795
1795
Featuring:
1796
1796
@@ -1813,7 +1813,7 @@ Links:
1813
1813
1814
1814
### Jul 22: [Using Scaffolding with Handlebars](https://www.youtube.com/live/6Ux7EpgiWXE?si=78XhoFrViXVkMXOL)
1815
1815
1816
-
Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET Core, Languages, CLI, MSBuild, and more.
1816
+
Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET, Languages, CLI, MSBuild, and more.
1817
1817
1818
1818
Featuring:
1819
1819
@@ -1839,7 +1839,7 @@ Links:
1839
1839
1840
1840
### Jun 24: [EF Core in Blazor](https://www.youtube.com/live/HNJYIqeBLQc?si=xvEObLRdY37_0L87)
1841
1841
1842
-
Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET Core, Languages, CLI, MSBuild, and more.
1842
+
Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET, Languages, CLI, MSBuild, and more.
1843
1843
1844
1844
Featuring:
1845
1845
@@ -1861,7 +1861,7 @@ Links:
1861
1861
1862
1862
### Jun 10: [EF Core Power Tools](https://www.youtube.com/live/OWuP_qOYwsk?si=VoSGWW6CfR8-x46P)
1863
1863
1864
-
Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET Core, Languages, CLI, MSBuild, and more.
1864
+
Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET, Languages, CLI, MSBuild, and more.
1865
1865
1866
1866
Featuring:
1867
1867
@@ -1881,7 +1881,7 @@ Links:
1881
1881
1882
1882
### May 6: [Introducing the EF Core Community Standup](https://www.youtube.com/live/j1sGgfCxhp0?si=VQBMex-9-me9JhAB)
1883
1883
1884
-
Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET Core, Languages, CLI, MSBuild, and more.
1884
+
Join members from the .NET teams for our community standup covering great community contributions for Framework, .NET, Languages, CLI, MSBuild, and more.
0 commit comments