Exemplo n.º 1
0
        public User Get(string email, string password)
        {
            var userDto = _unitOfWork.Session
                          .QueryOver <UserDto>()
                          .Where(u => u.Email == email)
                          .SingleOrDefault();

            return(userDto.Email == email && _passwordManager.Verify(userDto.PasswordHash, userDto.HashSalt, password)
                    ? (User)userDto
                    : null);
        }