yesubabu k

yesubabu k

  • 1.1k
  • 644
  • 62.6k

comma separated values

Jun 21 2019 1:08 AM
Dear Experts,
 
how to get Comma separated values from entities ?
 
for my MVC Application using entityframework
 
example:
 
var userDeviceList = (from user in db.tblUserMasters
join userInfo in db.UserDeviceMasters on user.Id equals userInfo.DeviceUserID
join prp in db.PropertyMasters on user.CompanyID equals prp.PropertyId
where user.CompanyID == cParam.CompanyId
select new UserDeviceInfo
{
UserId = user.Id,
DeviceUserName = user.UserName,
DeviceId = userInfo.DeviceID,
DeviceStatus = userInfo.DeviceStatus,
IsShared = userInfo.IsShared,
MicroServiceiD = userInfo.MicroServiceiD ?? 0,
RegisteredDate = userInfo.DeviceRegisterdOn,
UserMenuRoleId = userInfo.UserMenuRoleId ?? 0,
MicroServiceName =(from ms in db.Microservices where ms.ID == userInfo.MicroServiceiD select ms.AppsDesc).FirstOrDefault(),need to get comma separate value here
DevicePropertyName = (from prp in db.PropertyMasters where prp.PropertyId == userInfo.DevicePropertyId select prp.PropertyDesc).FirstOrDefault()
}).OrderBy(o => o.IMEINo).ToList();
 

Answers (2)