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));
        }
示例#2
0
 public IDataResult <BookImage> GetByBookId(int id)
 {
     return(new SuccessDataResult <BookImage>(_bookImageDal.Get(b => b.BookId == id)));
 }