示例#1
0
        public List <AdViewModel> GetAds(Guid countryId)
        {
            var entities = _repository.GetAll(countryId);

            if (entities == null)
            {
                throw new Exception(LOCALIZATION_AD_NOT_FOUND);
            }

            return(AdMapper.MapToAdViewModel(entities));
        }
示例#2
0
        public IEnumerable <Ad> GetAds()
        {
            var products = adRepository.GetAll();

            return(products);
        }