コード例 #1
0
 public SpecificationType ToSpecificationType(InsertSpecificationTypeRequestDto requestDto)
 {
     return(new SpecificationType()
     {
         Type = requestDto.Type,
         IsRequiredForCar = requestDto.IsRequiredForCar
     });
 }
コード例 #2
0
        public IHttpActionResult InsertSpecificationType(InsertSpecificationTypeRequestDto requestDto)
        {
            SpecificationType specificationType = _specificationTypeMapper.ToSpecificationType(requestDto);

            specificationType.Id = _specificationTypeService.InsertSpecificationType(specificationType);
            return(Created($"specificationType/{specificationType.Id}",
                           _specificationTypeMapper.ToDto(specificationType)));
        }