Ejemplo n.º 1
0
        public void Delete()
        {
            var query =
                from p in db.Table <Product>()
                select p;

            Assert.AreEqual(0, changeCount);
            Assert.AreEqual(22, query.Count());

            var pr = query.First();

            pr.Price = 10000000;
            db.Delete(pr);

            Assert.AreEqual(1, changeCount);
            Assert.AreEqual(21, query.Count());

            db.DeleteAll <Product>();

            Assert.AreEqual(2, changeCount);
            Assert.AreEqual(0, query.Count());
        }