My Projection class is working fine, but I'm still struggling with my group join. I'm trying to display 1 record for each animal, and I have 2+ matching records in my Genotype table, but I only want to display 1 record for each animal in my result set. But the trick is that I want to concatenate all the matching genotype values and display them in my 1 animal row in my result set.
List<AnimalGenotypeProjection> result = (from a in scope.Extent<Animal>()
join g in scope.Extent<Genotype>() on a.AnimalId equals g.ClientId
select new AnimalGenotypeProjection()
IdAnimal = a.IdAnimal,
AnimalId = a.AnimalId,
GenotypeCode = g.GenotypeCode
This is much harder than I imagined. Is this possible?