public IDataResult <BookImage> GetById(int id) { IResult result = BusinessRules.Run(CheckIfBookImageNull(id)); if (result != null) { return(new ErrorDataResult <BookImage>(BookImageMessages.BookImageLimitExceeded)); } return(new SuccessDataResult <BookImage>(_bookImageDal.Get(c => c.BookId == id), BookImageMessages.BookImageHasArrived)); }
public IDataResult <BookImage> GetByBookId(int id) { return(new SuccessDataResult <BookImage>(_bookImageDal.Get(b => b.BookId == id))); }