WIP:Update intro to RP to GA (#14457)
* Update intro to RP to GA * Update intro to RP to GA * Update intro to RP to GA * Update intro to RP to GA * Update intro to RP to GA * work * work * work * work * work * change dev lang from console to dotnetcli * Add missing word * work * work * workpull/14479/head
parent
5329360700
commit
398807706a
|
@ -82,7 +82,7 @@ To run the app after downloading the completed project:
|
|||
* At a command prompt in the project folder, run the following commands:
|
||||
|
||||
```dotnetcli
|
||||
dotnet tool install --global dotnet-ef --version 3.0.0-*
|
||||
dotnet tool install --global dotnet-ef
|
||||
dotnet ef database update
|
||||
```
|
||||
|
||||
|
@ -222,14 +222,17 @@ The following packages are automatically installed:
|
|||
# [Visual Studio Code](#tab/visual-studio-code)
|
||||
|
||||
* Run the following .NET Core CLI commands to install required NuGet packages:
|
||||
|
||||
<!-- TO DO After testing, Replace with
|
||||
[!INCLUDE[](~/includes/includes/add-EF-NuGet-SQLite-CLI.md)]
|
||||
remove dotnet tool install --global below
|
||||
-->
|
||||
```dotnetcli
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SQLite --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.Design --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.Tools --version 3.0.0-*
|
||||
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design --version 3.0.0-*
|
||||
dotnet add package Microsoft.Extensions.Logging.Debug --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SQLite
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
|
||||
dotnet add package Microsoft.EntityFrameworkCore.Design
|
||||
dotnet add package Microsoft.EntityFrameworkCore.Tools
|
||||
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
|
||||
dotnet add package Microsoft.Extensions.Logging.Debug
|
||||
```
|
||||
|
||||
The Microsoft.VisualStudio.Web.CodeGeneration.Design package is required for scaffolding. Although the app won't use SQL Server, the scaffolding tool needs the SQL Server package.
|
||||
|
@ -239,7 +242,7 @@ The following packages are automatically installed:
|
|||
* Run the following command to install the [aspnet-codegenerator scaffolding tool](xref:fundamentals/tools/dotnet-aspnet-codegenerator).
|
||||
|
||||
```dotnetcli
|
||||
dotnet tool install --global dotnet-aspnet-codegenerator --version 3.0.0-*
|
||||
dotnet tool install --global dotnet-aspnet-codegenerator
|
||||
```
|
||||
|
||||
* Run the following command to scaffold Student pages.
|
||||
|
|
|
@ -40,7 +40,7 @@ Drop-Database
|
|||
* Run the following command at a command prompt to install the EF CLI tools:
|
||||
|
||||
```dotnetcli
|
||||
dotnet tool install --global dotnet-ef --version 3.0.0-*
|
||||
dotnet tool install --global dotnet-ef
|
||||
```
|
||||
|
||||
* In the command prompt, navigate to the project folder. The project folder contains the *ContosoUniversity.csproj* file.
|
||||
|
|
|
@ -5,7 +5,7 @@ description: This article contains links to Azure host and deploy resources.
|
|||
monikerRange: '>= aspnetcore-2.1'
|
||||
ms.author: riande
|
||||
ms.custom: mvc
|
||||
ms.date: 09/07/2019
|
||||
ms.date: 07/28/2019
|
||||
uid: host-and-deploy/azure-apps/index
|
||||
---
|
||||
# Deploy ASP.NET Core apps to Azure App Service
|
||||
|
@ -91,7 +91,17 @@ The [IIS Integration Middleware](xref:host-and-deploy/iis/index#enable-the-iisin
|
|||
|
||||
## Monitoring and logging
|
||||
|
||||
Azure App Service offers the **ASP.NET Core Logging Extensions**, which enable logging integration for ASP.NET Core apps. To automatically add the extension to an App Service, use Visual Studio's **Publish** process with an **App Service** publish profile. When not using Visual Studio to deploy an app, manually install the extension in the Azure Portal via the App Service's **Development Tools** > **Extensions** dialog.
|
||||
::: moniker range=">= aspnetcore-3.0"
|
||||
|
||||
ASP.NET Core apps deployed to App Service automatically receive an App Service extension, **ASP.NET Core Logging Integration**. The extension enables logging integration for ASP.NET Core apps on Azure App Service.
|
||||
|
||||
::: moniker-end
|
||||
|
||||
::: moniker range="< aspnetcore-3.0"
|
||||
|
||||
ASP.NET Core apps deployed to App Service automatically receive an App Service extension, **ASP.NET Core Logging Extensions**. The extension enables logging integration for ASP.NET Core apps on Azure App Service.
|
||||
|
||||
::: moniker-end
|
||||
|
||||
For monitoring, logging, and troubleshooting information, see the following articles:
|
||||
|
||||
|
@ -122,11 +132,22 @@ When swapping between deployment slots, any system using data protection won't b
|
|||
* Redis cache
|
||||
|
||||
For more information, see <xref:security/data-protection/implementation/key-storage-providers>.
|
||||
|
||||
<a name="deploy-aspnet-core-preview-release-to-azure-app-service"></a>
|
||||
<!-- revert this after 3.0 supported
|
||||
## Deploy ASP.NET Core preview release to Azure App Service
|
||||
|
||||
Use one of the following approaches if the app relies on a preview release of .NET Core:
|
||||
|
||||
* [Install the preview site extension](#install-the-preview-site-extension).
|
||||
* [Deploy a self-contained preview app](#deploy-a-self-contained-preview-app).
|
||||
* [Use Docker with Web Apps for containers](#use-docker-with-web-apps-for-containers).
|
||||
-->
|
||||
## Deploy ASP.NET Core 3.0 to Azure App Service
|
||||
|
||||
We hope to have ASP.NET Core 3.0 available on Azure App Service soon.
|
||||
|
||||
Use one of the following approaches if the app relies on .NET Core 3.0:
|
||||
|
||||
* [Install the preview site extension](#install-the-preview-site-extension).
|
||||
* [Deploy a self-contained preview app](#deploy-a-self-contained-preview-app).
|
||||
* [Use Docker with Web Apps for containers](#use-docker-with-web-apps-for-containers).
|
||||
|
@ -224,7 +245,7 @@ For a 64-bit [framework-dependent deployment](/dotnet/core/deploying/#framework-
|
|||
|
||||
1. From a command shell, publish the app in Release configuration with the [dotnet publish](/dotnet/core/tools/dotnet-publish) command. In the following example, the app is published as a framework-dependent app:
|
||||
|
||||
```dotnetcli
|
||||
```console
|
||||
dotnet publish --configuration Release
|
||||
```
|
||||
|
||||
|
@ -262,7 +283,7 @@ Use Visual Studio or the command-line interface (CLI) tools for a [self-containe
|
|||
|
||||
1. From a command shell, publish the app in Release configuration for the host's runtime with the [dotnet publish](/dotnet/core/tools/dotnet-publish) command. In the following example, the app is published for the `win-x86` RID. The RID supplied to the `--runtime` option must be provided in the `<RuntimeIdentifier>` (or `<RuntimeIdentifiers>`) property in the project file.
|
||||
|
||||
```dotnetcli
|
||||
```console
|
||||
dotnet publish --configuration Release --runtime win-x86
|
||||
```
|
||||
|
||||
|
|
|
@ -21,17 +21,7 @@ Add a connection string to the *appsettings.json* file as shown in the following
|
|||
|
||||
### Add NuGet packages and EF tools
|
||||
|
||||
Open a terminal for the RazorPagesMovie project. Right click the project name in the design/layout bar and go to **Tools > Open** in Terminal. Run the following .NET Core CLI commands in the Termial:
|
||||
|
||||
```dotnetcli
|
||||
dotnet tool install --global dotnet-ef --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SQLite --version 3.0.0-*
|
||||
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.Design --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 3.0.0-*
|
||||
```
|
||||
|
||||
The preceding commands add Entity Framework Core Tools for the .NET CLI and several packages to the project. The `Microsoft.VisualStudio.Web.CodeGeneration.Design` package is required for scaffolding.
|
||||
[!INCLUDE[](~/includes/add-EF-NuGet-SQLite-CLI.md)]
|
||||
|
||||
<a name="reg"></a>
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
Run the following .NET Core CLI commands:
|
||||
|
||||
```dotnetcli
|
||||
dotnet tool install --global dotnet-ef
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SQLite
|
||||
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
|
||||
dotnet add package Microsoft.EntityFrameworkCore.Design
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
|
||||
```
|
||||
|
||||
The preceding commands add:
|
||||
|
||||
* The [aspnet-codegenerator scaffolding tool](xref:fundamentals/tools/dotnet-aspnet-codegenerator).
|
||||
* The Entity Framework Core Tools for the .NET Core CLI.
|
||||
* The EF Core SQLite provider, which installs the EF Core package as a dependency.
|
||||
* Packages needed for scaffolding: `Microsoft.VisualStudio.Web.CodeGeneration.Design` and `Microsoft.EntityFrameworkCore.SqlServer`.
|
|
@ -1,4 +1,13 @@
|
|||
<!--
|
||||
> [!IMPORTANT]
|
||||
> **ASP.NET Core preview releases with Azure App Service**
|
||||
>
|
||||
> ASP.NET Core preview releases aren't deployed to Azure App Service by default. To host an app that uses an ASP.NET Core preview release, see [Deploy ASP.NET Core preview release to Azure App Service](xref:host-and-deploy/azure-apps/index#deploy-aspnet-core-preview-release-to-azure-app-service).
|
||||
-->
|
||||
> [!IMPORTANT]
|
||||
> **ASP.NET Core 3.0 with Azure App Service**
|
||||
>
|
||||
> ASP.NET Core 3.0 has not yet been deployed to Azure App Service. We hope to provide ASP.NET Core 3 on Azure App Service soon. To host an app that uses an ASP.NET Core 3.0:
|
||||
|
||||
* Treat ASP.NET Core 3.0 like a preview release for Azure App Service deployment.
|
||||
* See [Deploy ASP.NET Core preview release to Azure App Service](xref:host-and-deploy/azure-apps/index#deploy-aspnet-core-preview-release-to-azure-app-service).
|
||||
|
|
|
@ -20,17 +20,7 @@ Add a connection string to the *appsettings.json* file:
|
|||
|
||||
### Add NuGet packages and EF tools
|
||||
|
||||
Run the following .NET Core CLI commands:
|
||||
|
||||
```dotnetcli
|
||||
dotnet tool install --global dotnet-ef --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SQLite --version 3.0.0-*
|
||||
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.Design --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 3.0.0-*
|
||||
```
|
||||
|
||||
The preceding commands add Entity Framework Core Tools for the .NET CLI and several packages to the project. The `Microsoft.VisualStudio.Web.CodeGeneration.Design` package is required for scaffolding.
|
||||
[!INCLUDE[](~/includes/add-EF-NuGet-SQLite-CLI.md)]
|
||||
|
||||
<a name="reg"></a>
|
||||
|
||||
|
|
|
@ -64,21 +64,7 @@ The preceding command adds the EF Core SQL Server provider. The provider package
|
|||
|
||||
# [Visual Studio Code / Visual Studio for Mac](#tab/visual-studio-code+visual-studio-mac)
|
||||
|
||||
Run the following .NET Core CLI commands:
|
||||
|
||||
```dotnetcli
|
||||
dotnet tool install --global dotnet-ef --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SQLite --version 3.0.0-*
|
||||
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.Design --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 3.0.0-*
|
||||
```
|
||||
|
||||
The preceding commands add:
|
||||
|
||||
* The Entity Framework Core Tools for the .NET CLI.
|
||||
* The EF Core SQLite provider, which installs the EF Core package as a dependency.
|
||||
* Packages needed for scaffolding: `Microsoft.VisualStudio.Web.CodeGeneration.Design` and `Microsoft.EntityFrameworkCore.SqlServer`.
|
||||
[!INCLUDE[](~/includes/add-EF-NuGet-SQLite-CLI.md)]
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -79,8 +79,8 @@ The following diagram shows the design of the app.
|
|||
```dotnetcli
|
||||
dotnet new webapi -o TodoApi
|
||||
cd TodoAPI
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.InMemory --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
|
||||
dotnet add package Microsoft.EntityFrameworkCore.InMemory
|
||||
code -r ../TodoApi
|
||||
```
|
||||
|
||||
|
@ -112,8 +112,8 @@ The following diagram shows the design of the app.
|
|||
Open a command terminal in the project folder and run the following commands:
|
||||
|
||||
```dotnetcli
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.InMemory --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
|
||||
dotnet add package Microsoft.EntityFrameworkCore.InMemory
|
||||
```
|
||||
|
||||
---
|
||||
|
@ -276,8 +276,8 @@ The preceding code:
|
|||
Run the following commands:
|
||||
|
||||
```dotnetcli
|
||||
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design --version 3.0.0-*
|
||||
dotnet add package Microsoft.EntityFrameworkCore.Design --version 3.0.0-*
|
||||
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
|
||||
dotnet add package Microsoft.EntityFrameworkCore.Design
|
||||
dotnet tool install --global dotnet-aspnet-codegenerator
|
||||
dotnet aspnet-codegenerator controller -name TodoItemsController -async -api -m TodoItem -dc TodoContext -outDir Controllers
|
||||
```
|
||||
|
|
|
@ -3,7 +3,7 @@ title: Add a model to a Razor Pages app in ASP.NET Core
|
|||
author: rick-anderson
|
||||
description: Discover how to add classes for managing movies in a database using Entity Framework Core (EF Core).
|
||||
ms.author: riande
|
||||
ms.date: 07/22/2019
|
||||
ms.date: 9/22/2019
|
||||
uid: tutorials/razor-pages/model
|
||||
---
|
||||
# Add a model to a Razor Pages app in ASP.NET Core
|
||||
|
@ -93,7 +93,7 @@ The *appsettings.json* file is updated with the connection string used to connec
|
|||
* Install the scaffolding tool:
|
||||
|
||||
```dotnetcli
|
||||
dotnet tool install --global dotnet-aspnet-codegenerator --version 3.0.0-*
|
||||
dotnet tool install --global dotnet-aspnet-codegenerator
|
||||
```
|
||||
|
||||
* **For Windows**: Run the following command:
|
||||
|
@ -116,7 +116,7 @@ The *appsettings.json* file is updated with the connection string used to connec
|
|||
* Install the scaffolding tool:
|
||||
|
||||
```dotnetcli
|
||||
dotnet tool install --global dotnet-aspnet-codegenerator --version 3.0.0-*
|
||||
dotnet tool install --global dotnet-aspnet-codegenerator
|
||||
```
|
||||
|
||||
* Run the following command:
|
||||
|
|
Loading…
Reference in New Issue