Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
すべてのユーザー名をグループごとにグループ化したい。私は試した :
var query = from u in db.Users group p by u.UserGroup select u.FullName;
どうすれば解決できますか?
これは、UserGroup とそのグループのすべての名前を含む匿名オブジェクトのシーケンスを返します。
var query = from u in db.Users group u by u.UserGroup into g select new { UserGroup = g.Key, Names = g.Select(x => x.FullName) };