aboue query i want to change in LINQ
from U in objEntity.tbl_user_relation join R in objEntity.tbl_role on U.RoleId equals R.Role_Id where U.User_Id == 9 select new { RoleName = R.RoleName}).ToList().Select(x => new {RoleNames = string.Join(",", x.RoleName)});
i wrote the aboue query but not displaying group of RoleNames
please help me...
Jaganathan BantheswaranPosted Oct 23, 2013, 9:44 AM
Try like this,
var names = string.Join(",", (from U in objEntity.tbl_user_relation join R in objEntity.tbl_role on U.RoleId equals R.Role_Id where U.User_Id == 9 select R.RoleName).ToList());
manjula dPosted Oct 24, 2013, 12:46 AM