示例#1
0
        public List <AdProductsModel> GetAdGridModel(Guid countryId)
        {
            var entities = _repository.GetAdGrid(countryId);

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

            return(AdMapper.MapToAdProductsModel(entities));
        }
示例#2
0
        public AdProductsModel GetAdAsViewModel(Guid id)
        {
            CurrentAdId = id;
            var entity = _repository.GetAdWithDetails(id);

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

            return(AdMapper.MapToAdProductsModel(entity));
        }