public OfferDataStore() { items = new List <Item>(); var current = Connectivity.NetworkAccess; if (current == NetworkAccess.Internet) { _offerRepository = new OfferRepository(); var offers = _offerRepository.GetOffers(1); foreach (var offer in offers) { items.Add(new Item { Id = offer.Id.ToString(), Text = offer.Name, Description = offer.Description, Color = offer.ColorCode, IsActive = false }); } } }
public IEnumerable <Offer> Get(string productName) { return(OfferRepository.GetOffers(productName)); }