Hello all -- I am facing a weird problem with my object that I create
at application start up. This object holds the data from the database
which is referenced throughout the application.
So the table contents following structure
ID , ParentID , Name, Value
First few values form the root of the structure. In my logic first I
create the root nodes and then with another query I get all the values
which are not the root and using the root values I create a list from
the non-root nodes.
For a specific root values deep in the tree I have 5 values but only 2
are fetched from that list. I have tested in other parts of the code
to see if only 2 values are returned for that node but it returns the
correct number (just for the test and not used anywhere). This issue
occurs only when I am actually building the tree. I fail to understand
why only for a specific value it returns incorrect number of children.
Any thoughts ?
var getChildren = (from mL in masterList
where mL.ParentID == parent.ID
orderby mL.ID
select new Category()
{
ID = mL.ID,
Name = mL.Name,
ParentID = mL.ParentID,
Parent = parent,
Level = parent.Level +
1 ,
Value = mL.Value,
ETFCount = mL.ETFCount
}
).ToList();
Above is the code that is used to create the tree (this is a part of
recursive code in the function).
--
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net