Is there any way to write a LINQ (or procedural style) query, that can select an item and all children with one query? I have entity:
public class Comment {
IEnumerable GetChild(int id) { return table.Where(x => x.ParentID == id || x.Id== id) .Union(table.Where(x => x.ParentID == id) .SelectMany(y => GetChild(y.Id)) ); }