I try to join two collection into one. If my second is empty I just need a null value, here is my code (it's correct if com
is not empty)
var tmp = List{ Elem {long UserID; string tmpContent} };
var com = List{ Comment{long UserID; string Content} } ;
var res = from t in tmp
group t by t.UserID into g
join c in com on g.Key equals c.UserID
select new AnswerSet(new List<Answer>(g), c.Content);
I would like to get AnswerSet(g, Content)
ou AnswerSet(g, null)
the problem, I guess, is with g.Key equals c.UserID
when com is empty