public List <GetOrganizationUnitWithUserOutput> GetAllWithUser(string roleStr) { Expression <Func <User, bool> > expr = null; if (!string.IsNullOrEmpty(roleStr)) { List <string> roleList = roleStr.Split(",").ToList(); expr = u => u.UserRoles.Any(v => roleStr.Contains(v.Role.Name)); } return(_orgUnitService.GetAllWithUser(expr)); }