我有两个表,部门和名称。通过联接,我将数据加载到列表中,以便部门重复使用列表中的所有名称。现在,我想从C#控制器方法返回此类数据。我该怎么做呢?
"engineering":
[{ "department": "engineering", "name": "Scott" },
{ "department": "engineering", "name": "Sally" }],
"sales":
[{ "department": "sales", "name": "Fred" }]
}```