I have used join in linq to join 2 tables. What is the difference between a join and Include. From what I see, they both behave the same.
Include vs. Joi
If you simply need all Orders
for some Customers
. Good example here for blog application is displaying all Comments
below Articles
always. Then Include
is your way of work.
Join
in opposition is more helpful if you need some Customers
and filters out them using some data contained in Orders
entity. For example you want to sort out Articles
to send to the Police Articles
with Comments
containing vulgar words.
Also if your Orders
entity contains a lot of data (many columns) taking a lot of memory and you don't need all of them then join
can be much more efficient but here always is a question what "lot of data" or "many columns" means so test first will be the best choice.