public async Task <ActionResult <PerfilDTO> > GetByIdAsync(string id) { try { var perfilPorId = await _perfilAppService.GetByIdAsync(id); if (perfilPorId == null) { return(NotFound()); } return(perfilPorId); } catch (Exception) { return(BadRequest()); } }