Try this one, may be it can help you
var p = products.Where(p => p.parent != null).select(p=>p.parent).Distinct();
var pro = products.Where(p => !p.Contains(p.Key))
.Select(p => new { ProKey = p.Key, ProName.Name });
May be its will work, and still you having problem that let me know...