コード例 #1
0
        public async Task <ActionResult <IEnumerable <CarDto> > > GetCar()
        {
            var cars = await _repository.GetAllAsync().ConfigureAwait(false);

            if (cars == null)
            {
                return(NotFound());
            }

            var result = _mapper.Map <CarDto[]>(cars);

            return(result);
        }