Esempio n. 1
0
        public async Task <ActionResult> Put(int id, [FromForm] VehiculoDTO vehiculoDTO)
        {
            await DeleteImage(id);

            vehiculoDTO.Foto = await _helperImage.Upload(vehiculoDTO.Image, directory);

            var vehiculo = _mapper.Map <Vehiculo>(vehiculoDTO);

            vehiculo.Id = id;
            await _vehiculoService.UpdateVehiculo(vehiculo);

            return(NoContent());
        }