public IDataResult <List <Car> > GetAll() { if (DateTime.Now.Hour == 22) { return(new ErrorDataResult <List <Car> >(Messages.MaintenanceTime)); } return(new SuccessDataResult <List <Car> >(_vehicleDal.GetAll(), Messages.VehicleListed)); }
public IDataResult <List <Vehicle> > GetAll(Expression <Func <Vehicle, bool> > filter = null) { // if(DateTime.Now.Hour==22) örnek iş kuralı //{ //return new ErrorDataResult<List<Vehicle>>(Messages.MaintenanceTime); //} return(new SuccessDataResult <List <Vehicle> >(_vehicleDal.GetAll(), Messages.VehiclesListed)); }
public List <Vehicle> GetAll() { return(_vehicleDal.GetAll()); }
public IDataResult <List <Vehicle> > GetAll() { return(new SuccessDataResult <List <Vehicle> >(_vehicleDal.GetAll(), Messages.CarListed)); }