Add item for page 495

This commit is contained in:
Mark J Price 2023-04-22 11:36:48 +01:00
parent 3ac02fbceb
commit a2cfbcdacc
2 changed files with 9 additions and 2 deletions

View file

@ -2,7 +2,7 @@
If you find any mistakes in the seventh edition, *C# 11 and .NET 7 - Modern Cross-Platform Development Fundamentals*, or if you have suggestions for improvements, then please [raise an issue in this repository](https://github.com/markjprice/cs11dotnet7/issues) or email me at markjprice (at) gmail.com.
[**Errata** (42 items)](errata.md): Typos, tool user interface changes, or mistakes in code that would cause a compilation error that prevents a successful build.
[**Errata** (43 items)](errata.md): Typos, tool user interface changes, or mistakes in code that would cause a compilation error that prevents a successful build.
[**Improvements** (31 items)](improvements.md): Changes to text or code that would improve the content. These are optional.

View file

@ -1,4 +1,4 @@
**Errata** (42 items)
**Errata** (43 items)
If you find any mistakes, then please [raise an issue in this repository](https://github.com/markjprice/cs11dotnet7/issues) or email me at markjprice (at) gmail.com.
@ -41,6 +41,7 @@ If you find any mistakes, then please [raise an issue in this repository](https:
- [NorthwindDb class changes](#northwinddb-class-changes)
- [Page 477 - Inserting entities](#page-477---inserting-entities)
- [Page 478 - Updating entities](#page-478---updating-entities)
- [Page 495 - Filtering entities with Where](#page-495---filtering-entities-with-where)
- [Page 548 - Creating a class library for a Northwind database context](#page-548---creating-a-class-library-for-a-northwind-database-context)
- [Page 550 - Creating a class library for entity models using SQL Server](#page-550---creating-a-class-library-for-entity-models-using-sql-server)
- [Page 551 - Creating a class library for entity models using SQL Server](#page-551---creating-a-class-library-for-entity-models-using-sql-server)
@ -588,6 +589,12 @@ Is missing the `$` prefix to make it an interpolated string, as shown in the fol
WriteLine($"Increase price success for ID: {resultUpdate.productId}.");
```
# Page 495 - Filtering entities with Where
> Thanks to [Masoud](https://github.com/MAS-OUD) for raising this [issue on 20 April 2023](https://github.com/markjprice/cs11dotnet7/issues/62).
In Steps 3 and 5, the screenshots in *Figure 11.1* and *Figure 11.2* show a solution name of **Chapter12** when it should be **Chapter11**. In the next edition, I will retake the screenshots.
# Page 548 - Creating a class library for a Northwind database context
In Step 11, you write an extension method that registers the `NorthwindContext` class for use as a dependency service. In later chapters, this will be used in ASP.NET Core and Blazor projects. By default, a `DbContext` class is registered using `Scope` lifetime, meaning that multiple threads can share the same instance. If more than one thread attempts to use the same `NorthwindContext` class instance at the same time then you will see the following runtime exception thrown: