Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 master detail in generated classes in dataset desi

Author  Topic 

rtutus
Aged Yak Warrior

522 Posts

Posted - 2007-07-25 : 11:54:14
My Need: VS 2005: embedding "master detail relation" in the generated classes in dataset designer

Hi,
In sql we have for example a category table and each category has a rows or products in a product table: relation 1 to many,

In dataset designer in the IDE, when I add product and category tableAdapters, I can see the one to many relation between the two.

But here is what I need:

In the Category class (for when I have a category instance for example: myCategory)

I need to refer to its products as part of the Category class,

For example, if I want to get all the products of an instance: myCategory I want to be able to refer to it this way:

myProducts = myCategory.Products

So how can I make that happen? is not it automatic with the dataset and tableadapters designer?

Just to make myslef clear, I need to tell that Category class has a property Products which is a collection of Products. How do I do that in the IDE pls?

Thank you.

   

- Advertisement -