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()); }
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())); }
public List <Image> GetAll(Expression <Func <Image, bool> > filter = null) { return(_imageDal.GetAll(filter)); }
public IDataResult <List <CarImage> > GetAll() { var result = _imageDal.GetAll(); return(new SuccessDataResult <List <CarImage> >(result)); }
public IDataResult <List <CarImage> > GetAll() { return(new SuccessDataResult <List <CarImage> >(_ımageDal.GetAll(), Messages.CarImageGetAll)); }