linq query to fetch parent child data from same table in csharp

Code Example - linq query to fetch parent child data from same table in csharp

                
                        var v = from p in db.tableName
        select new
        {
          ParentID = p.SerialNo,
          child = from c in db.tableName
                  where c.Parent == p.SerialNo select
                  new
                  {
                    ChildID = c.SerialNo,
                    ParentID = c.Parent
                  }
        };