Say I have two sets; Candy and Region. For each Candy I have one-to-many names of what that candy is called in a certain Region (CandyRegion).

I want to build a list of Candy objects where only a single CandyRegion.Name is selected. The CandyRegion.Name selected is determined by the most popular Region (where the number of candies available in that Region is the greatest).

Whats a suitable way to perform the query to find the most popular Region? What I have so far:

```
context.Candys
    .Select(c => c.CandyRegions
        .OrderByDescending(cr => 
            /* 
             * Order CandyRegion by Candy.CandyRegion.Count outside
             * the context of c? 
             */
            context.CandyRegions.Count(cr2 => cr2.RegionId == cr.RegionId)
        )
        .FirstOrDefault()
    )
    .ToList();

```

I have a feeling that the performance of the above query is going to be a problem.

Edit: Classes

```
public class Candy
{
    public int Id { get; set; }
    ...

    public virtual List<CandyRegion> CandyRegions { get; set; } 
}

public class Region
{
    public int Id { get; set; }
    ...

    public virtual List<CandyRegion> CandyRegions { get; set; } 
}

public class CandyRegion
{
    public int Id { get; set; }
    public string Name { get; set; }
    ...

    public int RegionId { get; set; }
    public virtual Region Region { get; set; }

    public int CandyId { get; set; }
    public virtual Candy Candy { get; set; }
}

```