Closed bavaro89 closed 1 year ago
Thanks for taking the time to raise this. It is already in the errata: https://github.com/markjprice/cs11dotnet7/blob/main/docs/errata/errata.md#page-477---inserting-entities
OK, looked for it but could not find it, sorry!
Chapter: 10 (Working with Data Using Entity Framework Core) Page Number: 345 (epub) Section Title: Modifying data with EF Core / Inserting entities Step Number: 4
Problem to fix: Method ListProducts is expecting an int array, but gets a single int, so it won't compile (cannot convert from 'int' to 'int[]?'): ListProducts(productIdToHighlight: resultAdd.productId);)
Suggested solution: Cf page 346 where it is working: ListProducts(productIdsToHighlight: new[] { resultAdd.productId });