public string GetRoleNames() { var roles = new RepoService <Role>("").GetAll(); var roleNames = RoleRefs.Select(m => roles.FirstOrDefault(n => n.No.Equals(m.RoleNo))) .Where(m => m != null).Select(m => m.Name).Distinct().ToList(); return(string.Join(",", roleNames)); }