I have a data template called ProductListingPage. I also have a data template called Product. All of the Products will be in the content tree directly beneath the ProductListingPage. I am using automatic code generation with TDS and Glass Mapper. Is there a way that I can specify that the children of the ProductListingPage should be of type Product? Can I specify that somewhere so that when the code is generated for the ProductListingPage type it will have that property?
Ideally in my razor view I would like to be able to loop through all of the products like this:
@foreach(var product in Model.Products)
Display the product info here...