1

私は次のクラスを持っています:

class AssembledDTO
{
    int pid,
    int blockId,
    List<string> references
}

次の方法ですべてをグループ化しようとしています。

AssembledParts.GroupBy(entry => new
                        {
                            entry.PID,
                            entry.BlockId
                        }).
                        Select( (key , val)=> new AssembledDTO
                            {
                                BlockId = key.Key.BlockId,
                                PID = key.Key.PID,
                                References = val.
                            }) 

グループ化した各グループのすべてをまとめたReferencesリストを取得したいと考えています。 references

どうすればそうできますか?ここで見逃しているものは何ですか?

4

1 に答える 1