We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7677cb commit 3eed34fCopy full SHA for 3eed34f
code/Chapter10/Northwind.EntityModels/Category.cs
@@ -16,5 +16,6 @@ public class Category
16
public virtual ICollection<Product> Products { get; set; }
17
// To enable developers to add products to a Category, we must
18
// initialize the navigation property to an empty collection.
19
+ // This also avoids an exception if we get a member like Count.
20
= new HashSet<Product>();
21
}
code/Chapter10/WorkingWithEFCore/Category.cs
code/Chapter10/WorkingWithEFCore/Product.cs
0 commit comments