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()); }