linq query to fetch parent child data from same table in c# code example
Example: linq query to fetch parent child data from same table in c#
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
}
};