示例#1
0
        public IResult Delete(Images carImage)
        {
            var image = _imagesDal.Get(c => c.Id == carImage.Id);

            if (image == null)
            {
                return(new ErrorResult("Resim Bulunamadı"));
            }
            FileHelper.Delete(image.ImagePath);
            _imagesDal.Delete(carImage);
            return(new SuccessResult("Seçili Resimler Silindi"));
        }
示例#2
0
        public IResult Delete(Images carImage)
        {
            var image = _carImageDAL.Get(c => c.Id == carImage.Id);

            if (image == null)
            {
                return(new ErrorResult("Image not found"));
            }

            FileHelper.Delete(image.ImagePath);
            _carImageDAL.Delete(carImage);
            return(new SuccessResult("Image was deleted successfully"));
        }
示例#3
0
        // [SecuredOperation("admin")]
        public IResult Delete(Images filmImage)
        {
            var image = _filmImagesDal.Get(f => f.Id == filmImage.Id);

            if (image == null)
            {
                return(new ErrorResult("Image not found"));
            }

            FileHelper.Delete(image.ImagePath);
            _filmImagesDal.Delete(filmImage);
            return(new SuccessResult("Image was deleted successfully"));
        }