I've got two models - Country:
public int id { get; set; }
public string CountryName { get; set; }
and FlagColor:
public int id { get; set; }
public string Color { get; set; }
public virtual Country Country { get; set; }
I am trying to create an object from a linq query that would output an object of
< CountryName,< List < ColorOfFlag>>
currently at the moment I have
var combinedList = from c in countries
join fc in flagColors on c.id equals fc.Country.id
select new {c, fc};
This is almost there but it is returning a row per flagColor so e.g
Belgium: Red
Belgium: Black and so forth
how do I convert my query to out put:
Belguim: { Red, Black, Yellow}