Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit 5def655

Browse files
davidfowlDamianEdwards
authored andcommitted
Small tweaks
1 parent 06b3e4b commit 5def655

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

docs/1. Create BackEnd API project.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,18 @@ First, open the `Controllers` folder and take a quick look at the `ValuesControl
147147

148148
### Using the cmd line
149149
1. Install the "Microsoft.VisualStudio.Web.CodeGeneration.Design" package
150-
```
151-
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design --version 3.0.0-preview5-19264-04
152-
```
150+
```console
151+
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design --version 3.0.0-preview5-19264-04
152+
```
153153

154154
1. Install the `aspnet-codegenerator` global tool by running the following command:
155-
156-
```
157-
dotnet tool install --global dotnet-aspnet-codegenerator
158-
```
155+
```console
156+
dotnet tool install --global dotnet-aspnet-codegenerator
157+
```
159158

160159
> Note: You will need to close and reopen the console window to be able to use this tool.
161160
2. Run the following in the project folder at the cmd line:
162-
```
161+
```console
163162
dotnet aspnet-codegenerator controller -api -name SpeakersController -m Speaker -dc BackEnd.Models.ApplicationDbContext -outDir Controllers
164163
```
165164

@@ -173,8 +172,8 @@ In this section, we'll be adding documentation to our API using the Swashbuckle
173172

174173
Additional information on using Swashbuckle in ASP.NET Core is available in this tutorial: [ASP.NET Web API Help Pages using Swagger](https://docs.microsoft.com/en-us/aspnet/core/tutorials/web-api-help-pages-using-swagger)
175174

176-
1. Add the `Swashbuckle.AspNetCore` NuGet package.
177-
> This can be done from the command line using `dotnet add package Swashbuckle.AspNetCore`
175+
1. Add a reference to `Swashbuckle.AspNetCore` version `5.0.0-rc2`.
176+
> This can be done from the command line using `dotnet add package Swashbuckle.AspNetCore --version 5.0.0-rc2`
178177
1. Add the Swashbuckle services in your `ConfigureServices` method:
179178
```csharp
180179
services.AddControllers();

0 commit comments

Comments
 (0)