Linked Questions

9 votes
4 answers
5k views

Image you are creating a DB schema for a threaded discussion board. Is there an efficient way to select a properly sorted list for a given thread? The code I have written works but does not sort the ...
Bill Gates's user avatar
10 votes
2 answers
5k views

Say that have the following CTE that returns the level of some tree data (adjacency model) that I have (taken from Hierarchical data in Linq - options and performance): WITH hierarchy_cte(id, ...
woggles's user avatar
  • 7,474
5 votes
2 answers
6k views

can anybody point me in the right direction as to how I would go about implementing a hierarchical navigation menu which is driven by database? I don't want to re-invent the wheel here, so I was ...
Riz's user avatar
  • 6,696
2 votes
3 answers
3k views

I have table as below. I need to get all the manager id's for the user id provided. userid managerid 10 1 9 10 6 9 2 6 4 1 If i pass 2 to my method I need to get 1,10,9 and 6. ...
San's user avatar
  • 1,837
3 votes
1 answer
3k views

This question refers to http://www.matthidinger.com/archive/2009/02/08/asp.net-mvc-recursive-treeview-helper.aspx Let's say I have a table that looks like this: (source: matthidinger.com) And I ...
Robert Harvey's user avatar
4 votes
2 answers
2k views

I want to retrieve the data and and display it in sorted (child below it's parent). The data items defined like this: ID | Title | Parent-ID What I do is first retrieving all items and then sorting....
jullin's user avatar
  • 633
1 vote
1 answer
1k views

Given the following: public class Person { public int PersonId { get; set; } public int? ParentId { get; set; } } Suppose I have the following tree structure (PersonID - ParentID): 1 - null 2 ...
Brian David Berman's user avatar
1 vote
2 answers
548 views

I currently have an IQueryable of Questions. In my Question object I have and "id" and a "parentId" which can be used to create a hierarchy. Currently, I bind a RadTreeView to the IQueryable of ...
Brian David Berman's user avatar
0 votes
2 answers
400 views

I have a database table like shown below: MenuItemID | int [Primary Key] 1 -----+ MenuItemName | nvarchar(100) | ParentID | int * -----+...
Vishal's user avatar
  • 6,428
1 vote
1 answer
356 views

I have used the accepted answer to the question Hierarchical data in Linq - options and performance successfully to query a hierarchical table for all descendants of a particular record/node. Now I ...
ProfK's user avatar
  • 51.4k
1 vote
1 answer
238 views

I have an SQL table in the following format: id categoryname parent id 1 cat1 0 2 cat2 1 3 cat3 2 4 cat4 0 5 cat5 ...
sam's user avatar
  • 11
0 votes
1 answer
228 views

Let's say I have this class Location, which represents locations. public class Location { public int LocationID { get; set; } public int JuridictionID { get; set; } public int LocationName { ...
Richard77's user avatar
  • 21.9k