public IResult Delete(int id)
        {
            var value = _galleryDal.Get(x => x.Id == id);

            _galleryDal.Delete(value);
            return(new SuccessResult());
        }
        public IResult Delete(GalleryImage galleryImage)
        {
            var result = DeleteGalleryImage(galleryImage.Source);

            if (result.Success)
            {
                _galleryDal.Delete(galleryImage);
                return(new SuccessResult(Messages.GalleryImageDeleted));
            }

            return(new ErrorResult(Messages.GeneralError));
        }
示例#3
0
 public void TDelete(Gallery t)
 {
     _galleryDal.Delete(t);
 }
示例#4
0
 public void RemoveImage(int id)
 {
     _galleryDal.Delete(_galleryDal.Get(s => s.Id == id));
 }