Supporting implementation
With the profile written, we’ll go back to the controller. Here, we’re going to map CarDto
to the car. Notice the next to last line of this code:
[HttpGet("{id}")] public async Task<ActionResult<CarDto>> Get(int id) { var car = await _carService.Get(id); if (car == null) { return NotFound(); } var carDto = _mapper.Map<CarDto>(car); ...