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

Commit 370621c

Browse files
davidfowlDamianEdwards
authored andcommitted
Clean up the first session instructions
- Make add reference instruction consistent - Made some small tweaks and clarifications
1 parent 1401aac commit 370621c

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

docs/1. Create BackEnd API project.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
}
3737
}
3838
```
39-
1. Add a reference to the NuGet package `Microsoft.EntityFrameworkCore.SqlServer` version `3.0.0-preview6.19304.10`. Note that you'll need to resolve several references by adding missing `using` statements (`Ctrl + .` is your friend).
40-
> **If you're not using Visual Studio** install the package from the command line with `dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 3.0.0-preview6.19304.10`
41-
1. Add a reference to the NuGet package `Microsoft.EntityFrameworkCore.Sqlite` version `3.0.0-preview6.19304.10`. Note that you'll need to resolve several references by adding missing `using` statements (`Ctrl + .` is your friend).
42-
> **If you're not using Visual Studio** install the package from the command line with `dotnet add package Microsoft.EntityFrameworkCore.Sqlite --version 3.0.0-preview6.19304.10`
39+
1. Add a reference to the NuGet package `Microsoft.EntityFrameworkCore.SqlServer` version `3.0.0-preview6.19304.10`.
40+
> This can be done from the command line using `dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 3.0.0-preview6.19304.10`
41+
1. Add a reference to the NuGet package `Microsoft.EntityFrameworkCore.Sqlite` version `3.0.0-preview6.19304.10`.
42+
> This can be done from the command line using `dotnet add package Microsoft.EntityFrameworkCore.Sqlite --version 3.0.0-preview6.19304.10`
4343
1. Next we'll create a new Entity Framework DbContext. Create a new `ApplicationDbContext` class in the `Models` folder using the following code:
4444
```csharp
4545
using Microsoft.EntityFrameworkCore;
@@ -96,9 +96,10 @@
9696

9797
## Configuring EF Migrations
9898

99-
### Visual Studio: Package Manager Console
100-
10199
1. Add a reference to the NuGet package `Microsoft.EntityFrameworkCore.Tools` version `3.0.0-preview6.19304.10`.
100+
> **If you're not using Visual Studio** install the package from the command line with `dotnet add package Microsoft.EntityFrameworkCore.Tools --version 3.0.0-preview6.19304.10`
101+
102+
### Visual Studio: Package Manager Console
102103

103104
1. In Visual Studio, select the Tools -> NuGet Package Manager -> Package Manager Console
104105

@@ -170,8 +171,9 @@ In this section, we'll be adding documentation to our API using the Swashbuckle
170171

171172
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)
172173

173-
1. Add a reference to `Swashbuckle.AspNetCore` version `5.0.0-rc2`.
174-
> This can be done from the command line using `dotnet add package Swashbuckle.AspNetCore --version 5.0.0-rc2`
174+
1. Add a reference to the NuGet package `Swashbuckle.AspNetCore` version `5.0.0-rc2`.
175+
> This can be done from the command line using `dotnet add package Swashbuckle.AspNetCore --version 5.0.0-rc2`
176+
175177
1. Add the Swashbuckle services in your `ConfigureServices` method:
176178
```csharp
177179
services.AddControllers();
@@ -180,7 +182,7 @@ Additional information on using Swashbuckle in ASP.NET Core is available in this
180182
options.SwaggerDoc("v1", new OpenApiInfo { Title = "Conference Planner API", Version = "v1" })
181183
);
182184
```
183-
1. Configure Swashbuckle by adding the following lines to top of the `Configure` method in `Startup.cs`:
185+
1. Configure Swashbuckle by adding the following lines just before `UseEndpoints` in the `Configure` method in `Startup.cs`:
184186
```csharp
185187
app.UseSwagger();
186188

0 commit comments

Comments
 (0)