Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hierarchical Data
Message
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01324151
Message ID:
01324449
Views:
15
>I have a table with and ID field and a ParentID field.
>
>For a root record, ParentID = ID
>For a child record ParentID = the ID of the Parent record.
>
>All records are in the same table.
>
>This is used for holding loose tree structured data. In VFP I would have just walked the tree manually. I just discovered that SQL server will let me show this as a foreign key relationship, which linq may be able to handle... Any idea if this will work?

Interesting. I don't think it actually supports that just yet, but I remember hearing something that it was on their list (some podcast I just listened to, I think).

You could just write a recursive query using CTE to do this instead. Let me know if you need a sample - it's pretty cool.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform