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

Commit 77f086f

Browse files
committed
Clean up the first session instructions
- Make add reference instruction consistent - Made some small tweaks and clarifications
1 parent e5af7ce commit 77f086f

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
@@ -40,10 +40,10 @@
4040
}
4141
}
4242
```
43-
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).
44-
> **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`
45-
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).
46-
> **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`
43+
1. Add a reference to the NuGet package `Microsoft.EntityFrameworkCore.SqlServer` version `3.0.0-preview6.19304.10`.
44+
> This can be done from the command line using `dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 3.0.0-preview6.19304.10`
45+
1. Add a reference to the NuGet package `Microsoft.EntityFrameworkCore.Sqlite` version `3.0.0-preview6.19304.10`.
46+
> This can be done from the command line using `dotnet add package Microsoft.EntityFrameworkCore.Sqlite --version 3.0.0-preview6.19304.10`
4747
1. Next we'll create a new Entity Framework DbContext. Create a new `ApplicationDbContext` class in the `Models` folder using the following code:
4848
```csharp
4949
using Microsoft.EntityFrameworkCore;
@@ -100,9 +100,10 @@
100100

101101
## Configuring EF Migrations
102102

103-
### Visual Studio: Package Manager Console
104-
105103
1. Add a reference to the NuGet package `Microsoft.EntityFrameworkCore.Tools` version `3.0.0-preview6.19304.10`.
104+
> **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`
105+
106+
### Visual Studio: Package Manager Console
106107

107108
1. In Visual Studio, select the Tools -> NuGet Package Manager -> Package Manager Console
108109

@@ -174,8 +175,9 @@ In this section, we'll be adding documentation to our API using the Swashbuckle
174175

175176
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)
176177

177-
1. Add a reference to `Swashbuckle.AspNetCore` version `5.0.0-rc2`.
178-
> This can be done from the command line using `dotnet add package Swashbuckle.AspNetCore --version 5.0.0-rc2`
178+
1. Add a reference to the NuGet package `Swashbuckle.AspNetCore` version `5.0.0-rc2`.
179+
> This can be done from the command line using `dotnet add package Swashbuckle.AspNetCore --version 5.0.0-rc2`
180+
179181
1. Add the Swashbuckle services in your `ConfigureServices` method:
180182
```csharp
181183
services.AddControllers();
@@ -184,7 +186,7 @@ Additional information on using Swashbuckle in ASP.NET Core is available in this
184186
options.SwaggerDoc("v1", new OpenApiInfo { Title = "Conference Planner API", Version = "v1" })
185187
);
186188
```
187-
1. Configure Swashbuckle by adding the following lines to top of the `Configure` method in `Startup.cs`:
189+
1. Configure Swashbuckle by adding the following lines just before `UseEndpoints` in the `Configure` method in `Startup.cs`:
188190
```csharp
189191
app.UseSwagger();
190192

0 commit comments

Comments
 (0)