I have a collection that I am trying to group on. If this statement does not return a value, I am trying to set the column to 0, but the group returns no results.
whatIfScenarios.Find(x => x.CbiId == g.First().CbiId && x.Type == WhatIfScenarioType.Plan).W
here is my code
var group = (from r in riskMarkOutputModel.Recommendations
where r.InPlan == true
group r by r.CbiId
IndexRecNum = g.First().IndexRecNum,
a = whatIfScenarios.Find(x => x.CbiId == g.First().CbiId && x.Type == WhatIfScenarioType.Plan).WhatIfOutput.RiskMarkScore ?? 0/*,
If I leave out the row "a", I get a group. If I leave "a" in, the group is empty. Even if the find is blank, I want the group to show.