I’m doing LINQ to SQL, and when I add a group clause, it complains that my joining field does not exist. What am I missing?
I have:
var q = from f in db.Faults
group f by f.FaultID into groupF
join af in db.AvailabilityFaults on groupF.FaultID equals af.FaultID
select groupF;
The problem is that it complains that ‘groupF.FaultID’ does not exist. If I remove the Group clause, then it works if I change the prefix alias (f.FaultID).
You need to join on the Group
Keylike so:The
Keyvalue will be theFaultIDfor that group, so it should work as expected.