public void QueryBoxToTakeListCountTest()
        {
            var box = Container.Resolve<BoxQuery<HttpProxyBoxMap>>().AsQueryable()
                .Where(x => x.Country == "zz");
            
            Assert.AreEqual(box.Take(20).Count(), 0);
            Assert.IsNull(box.Take(20).FirstOrDefault());
            Assert.AreEqual(box.Take(20).ToList().Count, 0);

            var repo = Container.Resolve<HttpProxyRepository>();
            repo.Save(new HttpProxyEntity()
            {
                Comment = "zzz", IP = ("http://usanov.net")
            });

            box = new BoxQuery<HttpProxyBoxMap>()
                .Where(x => x.Comment == "zzz");
            Assert.IsTrue(box.Count()>= 1);
            Assert.IsTrue(box.Take(20).Count()>= 1);
            Assert.IsNotNull(box.Take(20).FirstOrDefault());
            Assert.IsTrue(box.Take(20).ToList().Count>= 1);
        }
        public void QueryBoxToTakeListCountTest()
        {
            var box = Container.Resolve <BoxQuery <HttpProxyBoxMap> >().AsQueryable()
                      .Where(x => x.Country == "zz");

            Assert.AreEqual(box.Take(20).Count(), 0);
            Assert.IsNull(box.Take(20).FirstOrDefault());
            Assert.AreEqual(box.Take(20).ToList().Count, 0);

            var repo = Container.Resolve <HttpProxyRepository>();

            repo.Save(new HttpProxyEntity()
            {
                Comment = "zzz", IP = ("http://usanov.net")
            });

            box = new BoxQuery <HttpProxyBoxMap>()
                  .Where(x => x.Comment == "zzz");
            Assert.IsTrue(box.Count() >= 1);
            Assert.IsTrue(box.Take(20).Count() >= 1);
            Assert.IsNotNull(box.Take(20).FirstOrDefault());
            Assert.IsTrue(box.Take(20).ToList().Count >= 1);
        }
        public void LoadItems()
        {
            try
            {
                var query = new BoxQuery <T>();
                var list  = query.Take(20).ToList();
                Items = new ObservableCollection <T>(list);

                NotifyPropertyChanged("Items");
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error connecting to server");
            }
        }