Ejemplo n.º 1
0
        public async Task <IActionResult> DeleteAsync(CarImageDeleteDto carImageDeleteDto)
        {
            var deleteResult = await _carImageService.DeleteAsync(carImageDeleteDto);

            if (!deleteResult.Success)
            {
                return(BadRequest(deleteResult));
            }

            return(Ok(deleteResult));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Delete(int id)
        {
            var carImage = await _carImageService.GetByIdAsync(id);

            var result = await _carImageService.DeleteAsync(carImage.Data);

            if (result.Success)
            {
                return(NoContent());
            }

            return(BadRequest());
        }