public async Task <IHttpActionResult> ListarCategoriasDeUnRepresentante(CategoriasRepresentantes categoriaRepresentanteParaListar) { if (categoriaRepresentanteParaListar == null || categoriaRepresentanteParaListar.CodigoRepresentante <= 0 || categoriaRepresentanteParaListar.IdiomaBase == Idioma.SinIdioma) { return(BadRequest("categoriaRepresentanteAListar vacio y/o invalido!.")); } try { List <CategoriasRepresentantesDTO> listaCategoriasRepresentantes = await _categoriasBusiness.ListarCategoriasDeUnRepresentantePorIdioma(categoriaRepresentanteParaListar); return(Ok(listaCategoriasRepresentantes)); } catch (Exception ex) { return(InternalServerError(ex)); } }