Пример #1
0
        public IHttpActionResult GetSpecifications()
        {
            List <SpecificationResponseDto> responseDtos = new List <SpecificationResponseDto>();

            foreach (Specification specificationType in _specificationService.GetSpecifications())
            {
                responseDtos.Add(_specificationMapper.ToDto(specificationType));
            }

            return(Ok(responseDtos));
        }
Пример #2
0
        public IHttpActionResult FindCarSpecifications(int productId)
        {
            List <Specification> findCarSpecifications = _carService.FindCarSpecifications(productId);

            List <SpecificationResponseDto> responseDtos = new List <SpecificationResponseDto>();

            foreach (Specification findCarSpecification in findCarSpecifications)
            {
                responseDtos.Add(_specificationMapper.ToDto(findCarSpecification));
            }

            return(Ok(responseDtos));
        }