User475983607 posted
why do we need to mention FK columns in two model class ? is it necessary?
what the article try to explain?
if i mention FK in books class does it work or do i need to mention FK in book and author both class ?
So the navigation can go both ways. The Book class can have one Author and the Author class cab have many Books.
As with many of your recent posts, please take the time to read the MS reference documentation. Are you having trouble finding the reference documentation?
This tutorial explains how to use EF in ASP Core
https://docs.microsoft.com/en-us/aspnet/core/data/ef-mvc/
This link explains relationships, see the menu on the left for more information.
https://docs.microsoft.com/en-us/ef/core/modeling/relational/fk-constraints