コード例 #1
0
        public IResult Add(IFormFile file, BookImage bookImage)
        {
            IResult result = BusinessRules.Run(CheckImageLimitExceeded(bookImage.BookId));

            if (result != null)
            {
                return(result);
            }
            bookImage.ImagePath = FileHelper.Add(file);
            bookImage.Date      = DateTime.Now;
            _bookImageDal.Add(bookImage);
            return(new SuccessResult());
        }
コード例 #2
0
 public IResult Add(IFormFile file, BookImage bookImage)
 {
     bookImage.ImagePath = FileHelper.Add(file);
     bookImage.Date      = DateTime.Now;
     _bookImageDal.Add(bookImage);
     return(new SuccessResult());
 }