My goal is to get the following query result:
"Discussion": {
"DiscussionID": 1,
"Name": "Some Name",
"Body": "Some Body",
"Comments": [
{
"CommentID": 1,
"Body: "Some Body
}
]
}
I have 2 Tables: Discussions and Comments. A discussion has many comments
Discussion Table:
=================
DiscussionID
Name
Body
Comments Table:
===============
CommentID
DiscussionID
Body
How can I get all comments for a Discussion and fetch the discussion columns as well?