Ejemplo n.º 1
0
        public IList <Entities.User> GetUsersByRole(string role)
        {
            IList <Entities.User> users = new List <Entities.User>();

            using (var client = new AuthenticationServiceClient())
            {
                IList <AuthenticationService.User> authUsers = client.SearchUser("", "", role).ToList();
                if (authUsers != null && authUsers.Any())
                {
                    foreach (var authUser in authUsers)
                    {
                        users.Add(ServiceMapper.Mapper.Map <Entities.User>(authUser));
                    }
                }
            }

            return(users);
        }