Пример #1
0
        public async Task <ActionResult> Get(int id)
        {
            var vehiculo = await _vehiculoService.GetVehiculo(id);

            vehiculo.Foto = $"{Request.Scheme}://{Request.Host.Value}{Request.PathBase}/wwwroot/{vehiculo.Foto}";
            var vehiculoDTO = _mapper.Map <VehiculoDTO>(vehiculo);
            var response    = new ApiResponse <VehiculoDTO>(vehiculoDTO);

            return(Ok(response));
        }