Join (Include) two or more models

You have a model which defines book, and another model which defines author of the book.  How do you link them show in one table at the view?  Here is how.

suppose you have models define like below;

How to compose Linq that join these two together so it shows, Book ID, Title, Author Name?

The answer is, Use .include to include the model within.

 

Done.

Leave a Reply