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)); }
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)); }