Exemplo n.º 1
0
        public void TestRemoveItem()
        {
            StoreItemRepository     storeRepos = new StoreItemRepository();
            List <StoreItem>        list;
            IEnumerable <StoreItem> outItems;

            storeRepos.Open();
            list = storeRepos.GetAll().ToList();
            for (int i = 0; i < list.Count; i++)
            {
                Debug.WriteLine(list[i].Name);
            }
            Debug.WriteLine(list.Count);

            storeRepos.RemoveBy((i) => i.Name.ToLower().Contains("The"), out outItems);

            foreach (var item in outItems)
            {
                Debug.WriteLine(item.Name);
            }

            Debug.WriteLine(list.Count);

            storeRepos.Close();
        }
Exemplo n.º 2
0
        public void TestGetItemList()
        {
            StoreItemRepository storeRepos = new StoreItemRepository();
            List <StoreItem>    list;

            storeRepos.Open();
            list = storeRepos.GetAll().ToList();
            for (int i = 0; i < list.Count; i++)
            {
                Debug.WriteLine(list[i].Name);
            }
            Debug.WriteLine(list.Count);
            storeRepos.Close();
        }