public async Task <IActionResult> GetAllByIdPessoaAsync(int idPessoa) { try { var getAllPessoa = await _service.GetAllByIdPessoaasync(idPessoa); return(Ok(getAllPessoa)); } catch (ArgumentException e) { return(this.StatusCode(StatusCodes.Status500InternalServerError, $"{e.Message}")); } }