Beispiel #1
0
        public Professor TornarProfessor(Professor professor, string email, string senha)
        {
            var usuarioDB          = _usuarioRepositorio.ObterPorId(professor.UsuarioId, true);
            var credenciaisValidas = SenhaUtils.EncriptarSenha(senha) == usuarioDB.Senha && email == usuarioDB.Email;

            if (!credenciaisValidas)
            {
                throw new BusinessException("");
            }

            return(_repositorio.TornarProfessor(professor));
        }