public IActionResult ConsultarComParametro([FromBody] T objeto) { RetornoTratado <T> retorno = new RetornoTratado <T>(); retorno.Objeto = genericBusiness.ConsultarComParametro(objeto, retorno); if (retorno.Erro == true) { return(Unauthorized(retorno)); } else { return(Ok(retorno)); } }