Beispiel #1
0
        private IResult CheckIfImageCountMoreThanFive(int carId)
        {
            var result = _imageDal.GetAll(p => p.CarId == carId);

            if (result.Count > 5)
            {
                return(new ErrorResult(Messages.CarHasFiveImages));
            }
            return(new SuccessResult());
        }
Beispiel #2
0
        private IResult TotalPictureControl(int CarId)
        {
            var result = _ımageDal.GetAll(c => c.CarId == CarId).Count();

            if (result > 5)
            {
                return(new ErrorResult(Messages.TotalPictureMoreThanFive));
            }

            return(new SuccessResult());
        }
 public IDataResult <List <Image> > GetAll(Expression <Func <Image, bool> > filter = null)
 {
     return(new SuccessDataResult <List <Image> >(_imageDal.GetAll()));
 }
 public IDataResult <List <Image> > GetAll()
 {
     return(new SuccessDataResult <List <Image> >(_imageDal.GetAll()));
 }
Beispiel #5
0
 public List <Image> GetAll(Expression <Func <Image, bool> > filter = null)
 {
     return(_imageDal.GetAll(filter));
 }
Beispiel #6
0
        public IDataResult <List <CarImage> > GetAll()
        {
            var result = _imageDal.GetAll();

            return(new SuccessDataResult <List <CarImage> >(result));
        }
Beispiel #7
0
 public IDataResult <List <CarImage> > GetAll()
 {
     return(new SuccessDataResult <List <CarImage> >(_ımageDal.GetAll(), Messages.CarImageGetAll));
 }