private void SaveStudent(StudentDto studentDto) { var response = _controller.CreateNewStudentPost(studentDto); if (response.GetType() == new StudentDto().GetType()) { var obj = (StudentDto)response; Console.WriteLine($"Cadastro de aluno realizado com sucesso numero de matricula [ {obj.Id.ToString()} ]"); UserInteraction.PressToBackToMenu(); } else { var lista = (List <string>)response; foreach (var bad in lista) { Console.WriteLine($"ERR: {bad}"); } Console.WriteLine("Erro ao cadastrar aluno"); UserInteraction.PressToBackToMenu(); } }