ASP.NETMVCプロジェクトでEntityFrameworkを使用しています。
以下のエンティティがあるとしましょう:
public class Project
{
public int ProjectID { get; set; }
public string Description { get; set; }
public string Tags { get; set; }
}
DBに次のデータがあるとします。
ProjectID: 1
Description: "My first element"
Tags: "one, three, five, seven"
ProjectID: 2
Description: "My second element"
Tags: "one, two, three, six"
ProjectID: 3
Description: "My third element"
Tags: "two, three, four"
すべてのレコードからすべてのタグを収集したいと思います。つまり、「1、2、3、4、5、6、7」
どのようにできるのか?これはばかげた質問に思えるかもしれませんが、どうすればよいかわかりません。
ありがとう。