我有以下查询:
var users = (from a in dc.UserRoles
join u in dc.Users on a.intUserId equals u.ID
join r in dc.Roles on a.intRoleId equals r.ID
where r.intClientId == clientID
select new UserRoleDetail
{
ID = a.ID,
intUserId = a.intUserId,
intRoleId = a.intRoleId,
Name =u.FullName, //Here I need comma separated values.
intAssignedById = a.intAssignedById,
RoleName = r.vchName,
Function = u.vchFunction
});
我要求"Name =u.FullName"
的所有值在intRoleId的单个记录组中以逗号分隔。我的意思是每个角色我都需要将sigle记录中的所有用户名分开。有什么建议吗?