public IActionResult Delete([FromForm(Name = ("Id"))] int Id)
        {
            var carImage = _carImagesService.Get(Id).Data;

            var result = _carImagesService.Delete(carImage);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
示例#2
0
        public IActionResult Delete([FromBody] int imageId)
        {
            var carImage = _CarImageService.Get(imageId).Data;

            var result = _CarImageService.Delete(carImage);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }