public ValidationAppResult RegisterNewStudent(NewStudentViewModel newStudentVeiwModel) { BeginTransaction(); var student = StudentFactory.CreateStudentForRegistration(newStudentVeiwModel.Email, newStudentVeiwModel.Password, EncryptHelper.Encrypt(newStudentVeiwModel.Password), newStudentVeiwModel.Name, CharacterHelper.SomenteNumeros(newStudentVeiwModel.CPF), newStudentVeiwModel.DateOfBirth, newStudentVeiwModel.Active); var resultValidation = DomainToApplicationResult(_studentService.AddNewStudent(student)); if (resultValidation.IsValid) { Commit(); } return(resultValidation); }