From 25393b9a211940d328b830f09af72a0510ab17c8 Mon Sep 17 00:00:00 2001 From: Raman Zhylich Date: Sun, 3 Jun 2018 13:40:26 -0500 Subject: [PATCH 1/6] As per tutorial the intention was to use intermediate items variable --- chapters/use-a-database/create-service-class.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chapters/use-a-database/create-service-class.md b/chapters/use-a-database/create-service-class.md index e4f879b..655e70a 100644 --- a/chapters/use-a-database/create-service-class.md +++ b/chapters/use-a-database/create-service-class.md @@ -28,9 +28,10 @@ namespace AspNetCoreTodo.Services public async Task GetIncompleteItemsAsync() { - return await _context.Items + var items = await _context.Items .Where(x => x.IsDone == false) .ToArrayAsync(); + return items; } } } From 88a11b363d9957211f78c0184eaca42a119be91d Mon Sep 17 00:00:00 2001 From: Raman Zhylich Date: Sun, 3 Jun 2018 15:51:16 -0500 Subject: [PATCH 2/6] Fix typo. Rename UserManager to userManager --- chapters/security-and-identity/authorization-with-roles.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapters/security-and-identity/authorization-with-roles.md b/chapters/security-and-identity/authorization-with-roles.md index 4628e9d..239bb7e 100644 --- a/chapters/security-and-identity/authorization-with-roles.md +++ b/chapters/security-and-identity/authorization-with-roles.md @@ -301,7 +301,7 @@ You can inject the `UserManager` directly into a view to do these types of autho @if (signInManager.IsSignedIn(User)) { - var currentUser = await UserManager.GetUserAsync(User); + var currentUser = await userManager.GetUserAsync(User); var isAdmin = currentUser != null && await userManager.IsInRoleAsync( From 8bc3e1bdad4db4ad38f9b2298a4b5a5a0c61fd00 Mon Sep 17 00:00:00 2001 From: Nate Barbettini Date: Mon, 11 Jun 2018 06:09:47 -0700 Subject: [PATCH 3/6] Less confusing explanation --- chapters/automated-testing/integration-testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapters/automated-testing/integration-testing.md b/chapters/automated-testing/integration-testing.md index e243b37..11297ea 100644 --- a/chapters/automated-testing/integration-testing.md +++ b/chapters/automated-testing/integration-testing.md @@ -6,7 +6,7 @@ Integration tests are slower and more involved than unit tests, so it's common f In order to test the whole stack (including controller routing), integration tests typically make HTTP calls to your application just like a web browser would. -To write integration tests that make HTTP requests, you could manually start your application and tests at the same time, and write your tests to make requests to `http://localhost:5000`. ASP.NET Core provides a nicer way to host your application for testing, however: the `TestServer` class. `TestServer` can host your application for the duration of the test, and then stop it automatically when the test is complete. +To perform an integration test, you could start your application and manually make requests to http://localhost:5000. However, ASP.NET Core provides a better alternative: the `TestServer` class. This class can host your application for the duration of the test, and then stop it automatically when the test is complete. ### Create a test project From cdfc4c0521bb06619d799f2242d207518f3aa976 Mon Sep 17 00:00:00 2001 From: Nate Barbettini Date: Mon, 11 Jun 2018 06:23:07 -0700 Subject: [PATCH 4/6] Add new contributor --- chapters/conclusion/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chapters/conclusion/README.md b/chapters/conclusion/README.md index db35611..5539df2 100644 --- a/chapters/conclusion/README.md +++ b/chapters/conclusion/README.md @@ -37,7 +37,8 @@ To Jennifer, who always supports my crazy ideas. To the following contributors who improved the Little ASP.NET Core Book: * 0xNF -* Matt Welke +* Matt Welke (welke) +* Raman Zhylich (zhilich) To these amazing polyglot programmers who translated the Little ASP.NET Core Book: From a88fe4253864ab6181c6b16ea20cc843ab3a0e79 Mon Sep 17 00:00:00 2001 From: Nate Barbettini Date: Mon, 11 Jun 2018 06:25:57 -0700 Subject: [PATCH 5/6] Add missing using --- chapters/security-and-identity/authorization-with-roles.md | 1 + 1 file changed, 1 insertion(+) diff --git a/chapters/security-and-identity/authorization-with-roles.md b/chapters/security-and-identity/authorization-with-roles.md index 239bb7e..81be180 100644 --- a/chapters/security-and-identity/authorization-with-roles.md +++ b/chapters/security-and-identity/authorization-with-roles.md @@ -146,6 +146,7 @@ Create a new class in the root of the project called `SeedData`: ```csharp using System; +using System.Linq; using System.Threading.Tasks; using AspNetCoreTodo.Models; using Microsoft.AspNetCore.Identity; From 6957053b6e560b3a0d8a7cb3e1d4f1c84ed08868 Mon Sep 17 00:00:00 2001 From: Nate Barbettini Date: Mon, 11 Jun 2018 06:30:55 -0700 Subject: [PATCH 6/6] Release note for 1.1.1 --- chapters/conclusion/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chapters/conclusion/README.md b/chapters/conclusion/README.md index 5539df2..62f04b7 100644 --- a/chapters/conclusion/README.md +++ b/chapters/conclusion/README.md @@ -51,6 +51,8 @@ The full, detailed changelog is always available here: https://github.com/nbarbettini/little-aspnetcore-book/releases +**1.1.1** (2018-06-11): Fixed typos found by readers. + **1.1.0** (2018-05-03): Significantly reworked the *Add more features* chapter to use MVC thorough the whole stack and remove the AJAX pattern. Removed Facebook login to simplify the security chapter and streamline testing and deployment. Updated the Docker instructions to reflect the latest best practices. Fixed typos and added suggestions from readers. The book also sports a new, improved cover design! **1.0.4** (2018-01-15): Added explanation of service container lifecycles, clarified server ports and the -o flag, and removed semicolons after Razor directives. Corrected Chinese translation author credit. Fixed other small typos and issues noticed by readers.