I'm trying to run a LINQ to SQL query that returns a result in a grid view in a search engine style listing.
In the simplified example below, is it possible to populate the collection with a comma-separated list of any children that the parent has (NAMESOFCHILDREN) in a single query?
var family = from p in db.Parents
where p.ParentId == Convert.ToInt32(Request.QueryString["parentId"])
join pcl in db.ParentChildLookup on p.ParentId equals pcl.ParentId
join c in db.Children on pcl.ChildId equals c.ChildId
select new
{
Family = "Name: " + p.ParentName + "<br />" +
"Children: " + NAMESOFCHILDREN? + "<br />"
};
Thanks in advance.