-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Step elaboration, typo fixes and using statements reorganization #71
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,10 +33,12 @@ AspNetCoreTodo/ | |
AspNetCoreTodo.UnitTests.csproj | ||
``` | ||
|
||
Since the test project will use the classes defined in your main project, you'll need to add a reference to the `AspNetCoreTodo` project: | ||
Since the test project will use the classes defined in your main project, you'll need to add a reference to the `AspNetCoreTodo` project. | ||
|
||
Use `cd` to navigate to the newly-created AspNetCoreTodo.UnitTests project directory, and type: | ||
|
||
``` | ||
dotnet add reference ../AspNetCoreTodo/AspNetCoreTodo.csproj | ||
dotnet add reference ..\AspNetCoreTodo\AspNetCoreTodo.csproj | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see my previous comment |
||
``` | ||
|
||
Delete the `UnitTest1.cs` file that's automatically created. You're ready to write your first test. | ||
|
@@ -79,12 +81,12 @@ To write a unit test that will verify the logic in the `TodoItemService`, create | |
**AspNetCoreTodo.UnitTests/TodoItemServiceShould.cs** | ||
|
||
```csharp | ||
using System; | ||
using System.Threading.Tasks; | ||
using AspNetCoreTodo.Data; | ||
using AspNetCoreTodo.Models; | ||
using AspNetCoreTodo.Services; | ||
using Microsoft.EntityFrameworkCore; | ||
using System; | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
|
||
namespace AspNetCoreTodo.UnitTests | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
## Connect to a database | ||
|
||
There are a few things you need to use Entity Framework Core to connect to a database. Since you used `dotnet new` and the MVC + Individual Auth template to set your project, you've already got them: | ||
There are a few things you need, to use Entity Framework Core to connect to a database. Since you used `dotnet new` and the MVC + Individual Auth template to set your project, you've already got them: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No comma needed here! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have no idea what went through my head at the time of writing. |
||
|
||
* **The Entity Framework Core packages**. These are included by default in all ASP.NET Core projects. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This depends on the OS (Windows vs. linux) - lets keep that consistent across the whole project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point.