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)); }
public IEnumerable <Ad> GetAds() { var products = adRepository.GetAll(); return(products); }