You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Object rss =
new JObject(
new JProperty("Products",
new JObject(
from c in Categories
select new JObject(
new JProperty("ProductCategoryID", c.CategoryID),
new JProperty("Category", c.Name),
new JProperty("psc",
new JArray(
from sc in Subcategories
where sc.CategoryID == c.CategoryID
select new JObject(
new JProperty("ProductSubcategoryID", sc.SubcategoryID),
new JProperty("SubCategory", sc.Name),
new JProperty("p",
new JArray(
from p in Products
where p.scID == sc.SubcategoryID
select new JObject(
new JProperty("Item", p.Name),
new JProperty("ProductID", p.ProductID),
new JProperty("ListPrice", p.ListPrice)))))))))));
Console.WriteLine(rss.ToString());
The text was updated successfully, but these errors were encountered:
This is my C# JSON code:
Object rss =
new JObject(
new JProperty("Products",
new JObject(
from c in Categories
select new JObject(
new JProperty("ProductCategoryID", c.CategoryID),
new JProperty("Category", c.Name),
new JProperty("psc",
new JArray(
from sc in Subcategories
where sc.CategoryID == c.CategoryID
select new JObject(
new JProperty("ProductSubcategoryID", sc.SubcategoryID),
new JProperty("SubCategory", sc.Name),
new JProperty("p",
new JArray(
from p in Products
where p.scID == sc.SubcategoryID
select new JObject(
new JProperty("Item", p.Name),
new JProperty("ProductID", p.ProductID),
new JProperty("ListPrice", p.ListPrice)))))))))));
The text was updated successfully, but these errors were encountered: