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