You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can lines 30-32 of NorthwindContextLib/Northwind.cs be commented out i.e. do they duplicate functionality provided by lines 81-83 ? Also for same reason lines lines 85-87 vs 111-113?
Please could you clarify, is this duplication and can these lines be removed? Otherwise in what situation would problems occur? What happens with duplication of relationships when specified using the has/with pattern in fluent?
More generally it would be very much appreciated if you could comment on the pros and cons of using fluent to specify these relationships vs relying upon One To Many Relationships Conventions:
It seems that the relationship is fully defined already by convention due to both ends being present in the entity classes i.e. public ICollection<Product> Products { get; set; } in Category and public Category Category { get; set; } in Product along with the foreign key public int? CategoryID { get; set; } in Product.
If so maybe we could add a comment to this affect - such that the code demonstrates both relationships by convention and by fluent API?
The text was updated successfully, but these errors were encountered:
Excellent book, thank you!
cs8dotnetcore3/PracticalApps/NorthwindContextLib/Northwind.cs
Line 30 in f0e427c
Can lines 30-32 of NorthwindContextLib/Northwind.cs be commented out i.e. do they duplicate functionality provided by lines 81-83 ? Also for same reason lines lines 85-87 vs 111-113?
Please could you clarify, is this duplication and can these lines be removed? Otherwise in what situation would problems occur? What happens with duplication of relationships when specified using the has/with pattern in fluent?
More generally it would be very much appreciated if you could comment on the pros and cons of using fluent to specify these relationships vs relying upon One To Many Relationships Conventions:
It seems that the relationship is fully defined already by convention due to both ends being present in the entity classes i.e.
public ICollection<Product> Products { get; set; }
in Category andpublic Category Category { get; set; }
in Product along with the foreign keypublic int? CategoryID { get; set; }
in Product.If so maybe we could add a comment to this affect - such that the code demonstrates both relationships by convention and by fluent API?
The text was updated successfully, but these errors were encountered: