I have questions that may or may not have question_group
if all questions have no question_group, and if I use default, if empty, like this:
question_group defaultQuestion = new question_group {question_group_id = Guid.Empty};
questions.Select(x => x.question_group).DefaultIfEmpty(defaultQuestion).Distinct();
Should I not get IEnumerable<question_group>that contains only the default question group that I defined? I get null .... what am I missing here?
source
share