public IHttpActionResult GetSpecifications() { List <SpecificationResponseDto> responseDtos = new List <SpecificationResponseDto>(); foreach (Specification specificationType in _specificationService.GetSpecifications()) { responseDtos.Add(_specificationMapper.ToDto(specificationType)); } return(Ok(responseDtos)); }
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)); }