Who is Participating?

You have not provided the types of your objects, so I make some assumptions here: in your current query you select the whole l object which is the whole SubArea. However you are then checking if it contains a specific ID, which is probably a number. So you need to change one of the queries: either change the one for the areaIds to select the ID (e.g. "select l.AreaId") or the one checking the existence (e.g. "where areaIds.Any(l => l.AreaId == m.SubAreaRef)")