I have been unsuccessful in getting the properties of the product to display in my XML and JSON. I have reviewed your code against mine and could not determine any variations in the Category, Product, or Northwind classes.
I even straight copied your code from those classes into mine after a few attempts but with no success. If anyone could look at it and see what I'm missing that would be great! I tried using the debugger on the actual item in the foreach loop but wasn't sure how to really trace what was going on.
<?xml version="1.0" encoding="utf-8"?>
<categories>
<category id="1" name="Beverages" description="Soft drinks, coffees, teas, beers, and ales" count="0">
<products />
</category>
<category id="2" name="Condiments" description="Sweet and savory sauces, relishes, spreads, and seasonings" count="0">
<products />
</category>
"categories": [
{
"id": 1,
"name": "Beverages",
"desc": "Soft drinks, coffees, teas, beers, and ales",
"product_count": 0,
"products": []
},
{
"id": 2,
"name": "Condiments",
"desc": "Sweet and savory sauces, relishes, spreads, and seasonings",
"product_count": 0,
"products": []
},