Exemplo n.º 1
0
 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));
 }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
 public List <Vehicle> GetAll()
 {
     return(_vehicleDal.GetAll());
 }
Exemplo n.º 4
0
 public IDataResult <List <Vehicle> > GetAll()
 {
     return(new SuccessDataResult <List <Vehicle> >(_vehicleDal.GetAll(), Messages.CarListed));
 }