public IResult Update(IFormFile file, BookImage bookImage)
        {
            IResult result = BusinessRules.Run(CheckImageLimitExceeded(bookImage.BookId));

            if (result != null)
            {
                return(result);
            }
            bookImage.ImagePath = FileHelper.Update(_bookImageDal.Get(p => p.Id == bookImage.Id).ImagePath, file);
            bookImage.Date      = DateTime.Now;
            _bookImageDal.Update(bookImage);
            return(new SuccessResult());
        }
Beispiel #2
0
 public IResult Update(BookImage bookImage)
 {
     _bookImageDal.Update(bookImage);
     return(new SuccessResult(Messages.BookImageUpdated));
 }