public IDataResult <List <Car> > GetAll() { if (DateTime.Now.Hour == 22) { return(new ErrorDataResult <List <Car> >(Messages.MaintenanceTime));//Generate field dediğimizde Messages a ekleme yapar } return(new SuccessDataResult <List <Car> >(_carProductDal.GetAll(), Messages.ProductListed)); }
[CacheAspect] //key, value public IDataResult <List <Car> > GetAll() { return(new SuccessDataResult <List <Car> >(_carProduct.GetAll(), Messages.Listed)); }
public List <Cars> GetAll() { return(_carProductDal.GetAll()); }