/// <summary> /// Gets all types of products /// </summary> /// <returns>List of all available product types</returns> public IEnumerable <ProductTypeModel> GetAllProductTypes() { try { return(_productTypeRepository.GetAllProductTypes()); } catch (Exception ex) { throw new Exception("Error while geting all product types: " + ex.Message, ex); } }
public List <ProductTypeDTO> GetAllProductTypes() { return(mapper.Map <List <ProductType>, List <ProductTypeDTO> >(_productTypeRepository.GetAllProductTypes())); }
public IEnumerable <ProductType> GetAll() { return(_repo.GetAllProductTypes()); }
public List <ProductType> GetAllProductTypes() { return(repositoryProductType.GetAllProductTypes()); }
public AddProductContentsDTO GetAddProductContents() { var listGendersDto = _genderService.GetAllGenders(); var addProductDTO = new AddProductContentsDTO() { Brands = mapper.Map <List <Brand>, List <BrandDTO> >(_brandRepository.GetAllBrands()), Categories = mapper.Map <List <Category>, List <CategoryDTO> >(_categoryRepository.GetAllCategories()), Genders = listGendersDto, ProductTypes = mapper.Map <List <ProductType>, List <ProductTypeDTO> >(_productTypeRepository.GetAllProductTypes()), Sizes = mapper.Map <List <ProductSize>, List <ProductSizeDTO> >(_productSizeRepository.GetAllProductSizes()) }; return(addProductDTO); }