Wie man bestimmte Spalte deutlich in LINQ to SQL

Ich bin mit den Spalten Kategorie und die Lieder in meiner Tabelle für jede Kategorie. Es sind fast 10 songs und insgesamt gibt es 7 Kategorien, wie, es ist vorgelegt, wie

category1 songCategory1a
category1 songCategory1b
category1 songCategory1c
---
---
--
category2 songCategory2a
category2 songCategory2b
category2 songCategory2c
---
---
---
category3 songCategory3a
category3 songCategory3b
category3 songCategory3c
---
---
---

Mag, dass es ist eine Tabelle in die ich möchte, um das Ergebnis, als

category1
category2
category3
category4

Habe ich versucht:

(from s in _context.db_songs
     select new { s.Song_Name, s.Song_Category }).Distinct().ToList();

Aber es hat nicht funktioniert. Die sich daraus ergebenden als solche.

InformationsquelleAutor kart | 2010-05-07

Schreibe einen Kommentar