Ejemplo n.º 1
0
        public ObservableCollection <SepetModel> GetAllItems()
        {
            sepetItems = new ObservableCollection <SepetModel>();
            RestAPI    = new RestAPI();
            List <Sepet> sepet = RestAPI.GetSepet();

            if (sepet == null)
            {
                return(sepetItems);
            }
            foreach (var item in sepet)
            {
                SepetModel sepetItem = new SepetModel()
                {
                    Id              = item.Id,
                    ProductName     = item.Name,
                    ProductPrice    = item.Price,
                    ProductNewPrice = item.new_Price,

                    ProductImages = item.Images,
                };
                sepetItems.Add(sepetItem);
            }
            return(sepetItems);
        }