public List <AdvertisementViewModel> GetAll()
        {
            var advs   = _advertisementRepository.FindAll();
            var advVms = Mapper.Map <List <Advertisement>, List <AdvertisementViewModel> >(advs.ToList());

            return(advVms);
        }
Esempio n. 2
0
 public IEnumerable <Advertisement> Search(Expression <Func <Advertisement, bool> > predicate)
 {
     return(_advertisements.FindAll(predicate)
            .OrderByDescending(r => r.DateCreated));
 }