public IActionResult GetAllProductGroups(ProductGroupResourceParameters resourceParameters) { if (!_typeHelperService.TypeHasProperties <ProductGroupDto>(resourceParameters.Fields)) { return(BadRequest()); } var entities = _productGroupRepository.GetAll(); var productGroups = Mapper.Map <IEnumerable <ProductGroupDto> >(entities).ShapeData(resourceParameters.Fields); return(Ok(productGroups)); }
/// <summary> /// /// </summary> /// <returns></returns> public IEnumerable <ProductGroup> GetProductGroups() { return(_roleRepository.GetAll()); }