Example #1
0
        public async Task <IEnumerable <User> > SearchUserByEmail(string partialEmail)
        {
            _userValidator.ValidateSearchTerm(partialEmail);

            var emailTerm = partialEmail.ToLower();
            var result    = await _userRepository.Select(u => u.Email.Contains(emailTerm));

            return(result.Select(u => u.WithoutPasswordHash()));
        }