public IActionResult getByStudentByType(string studentType) { if (string.IsNullOrWhiteSpace(studentType)) { return(BadRequest(this.responseHandler.getAppCustomErrorResponse("Invalid student type"))); } try { return(Ok(_estudianteApplicationService.getByStudentType(studentType))); } catch (ArgumentException ex) { return(BadRequest(this.responseHandler.getAppCustomErrorResponse(ex.Message))); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError, this.responseHandler.getAppExceptionResponse())); } }
public List <EstudianteDTO> getByStudentByType(string studentType) { if (string.IsNullOrWhiteSpace(studentType)) { return(null); } try { return(_estudianteApplicationService.getByStudentType(studentType)); } catch (ArgumentException ex) { return(null); } catch (Exception ex) { return(null); } }