You may use the ADO.Net Entity framework. Check out this tutorial:
http://www.codeguru.com/csharp/csharp/net30/article.php/c15489
Below is the sample code that i have written which is similar to your
need:
Database1Entities db = new Database1Entities();
var v = from p in db.prods
select new
{
p.prod_id,
p.prod_desc,
item_sold = (from s in db.sales
where s.prod_id == p.prod_id
select s)
};
In Database1, it contains 2 tables:
-prods (prod_id int, prod_desc nvarchar(100))
-sales (dt datetime, qty int, amt money, inv_no nvarchar(100), seq
int, prod_id int)
Hope it helps.
On Jan 10, 11:27 am, SM <[email protected]> wrote:
> So as described in the problem at first I have the data and I need to build
> a tree that I will store in memory on application startup. Now I am unable
> to understand the buildup itself as I want to build the nodes and its
> children.
>
> Is there any specific information I am missing that I can provide to make
> the problem easier to understand? I will try by best to clarify.
>
> Thanks,
>
> - SM
>