i need to be able to get distinct values grouped by FileID and by SentToID
this is what i have now, and it only groups by SentToID, which is missing some records.
var sentByResults = from v in ctx.vEmailSents where v.TypeDesc.Equals("Request") group v by v.SentTo_ID into g select g.OrderByDescending(x => x.DateSent).FirstOrDefault() into lastV select new { ClaimID = lastV.Claim_ID, SentToID= lastV.SentTo_ID, }; so if i have 5 records
claim id fileid sentToID 1 15 27 1 16 27 1 15 26 1 15 26 1 15 47 right now i get 3 records back, one for each unique sentToID, but i need to get 4 records back, for each unique ID within each unique fileID