public Professor GetByCpf(string cpf) { if (string.IsNullOrEmpty(cpf)) { throw new ArgumentException("o cpf não pode ser vazio ou nulo."); } return(_repository.GetByExpression(p => p.Cpf.Equals(cpf)).FirstOrDefault()); }