How to search and generate List in List in Linq

< H2 > premise: < / H2 >

there are two tables in the database: the User table and the Score table.

User
id    name        
1    Young        25
2    Hong         24

Score
id    userId    course    score
10    1            100
11    1            90
12    2            95
13    2            85

at present, I use this linq sentence to check:

(from u in User join s in Score
on u.id equals s.userId
select MapToEntity(u,s)).ToList());

private User MapToEntity(User u, Score s){
    u.score = s;
    return u;
}

the result of the joint survey is as follows:

{
    User{
        Young,,25
        Score{
            10,1,100
        }
    },
    User{
        Young,,25
        Score{
            11,190
        }
    }
    User{
        Hong,24
        Score{
            12,295
        }
    }
    User{
        Hong,24
        Score{
            13,285
        }
    }
}
< H2 > question < / H2 >

how to get such a result through Linq search:

{
    User{
        Young,,25
        Score{
            10,1,100
        }
        Score{
            11,190
        }
    },
    User{
        Hong,24
        Score{
            12,295
        }
        Score{
            13,285
        }
    }
}

the class I define is different from yours:

  go to Ubuntu Pastebin to check  

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b365a5-2bfec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b365a5-2bfec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?