[Sorry if it is a duplicate] I couldn't find properly solution, so I decided to ask a question.
I have an object companies
which returns list of elements.
I would like to write a query which will select these all CompanyId
which we have in our list. I don't want to select only one record by using FirstOrDefault()
.
Example:
var companiesSummary = _context.Company
.Where(c => c.CompanyId == companies.Select(cs => cs.ID))
.Include(country => country.Country)
How can I cope with it? Do you have any ideas?