【发布时间】:2010-05-07 06:53:21
【问题描述】:
我在每个类别的表格中都有列作为类别和歌曲。几乎有10首歌曲,总共有7个类别,因此它被列为
category1 songCategory1a
category1 songCategory1b
category1 songCategory1c
---
---
--
category2 songCategory2a
category2 songCategory2b
category2 songCategory2c
---
---
---
category3 songCategory3a
category3 songCategory3b
category3 songCategory3c
---
---
---
就像有一个表,我想在其中得到结果
类别1 类别2 类别3 类别4
我试过了:
(from s in _context.db_songs
select new { s.Song_Name, s.Song_Category }).Distinct().ToList();
但它没有用。结果就是这样。
【问题讨论】:
标签: c# linq-to-sql model-view-controller