コード例 #1
0
        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));
        }
コード例 #2
0
 [CacheAspect]          //key, value
 public IDataResult <List <Car> > GetAll()
 {
     return(new SuccessDataResult <List <Car> >(_carProduct.GetAll(), Messages.Listed));
 }
コード例 #3
0
 public List <Cars> GetAll()
 {
     return(_carProductDal.GetAll());
 }