Example #1
0
        protected void SPTest()
        {
            using (EasySession easySession = new EasySession())
            {
                ProductModel productModel = new ProductModel();
                int resultCount = productModel.Count(easySession);
                Assert.AreEqual(129, resultCount);

                ObjectQuery testOQ = new ObjectQuery();
                //testOQ.DeleteSP("uspDeleteProductModels", easySession).SetParameterList("list", new int[] { 1, 2, 3 }, typeof(int)).Execute();

                resultCount = productModel.Count(easySession);
                Assert.AreEqual(126, resultCount);
            }
        }
Example #2
0
        protected void QueryTest()
        {
            using (EasySession easySession = new EasySession())
            {
                ProductModel productModel = new ProductModel();
                int resultCount = productModel.Count(easySession);
                Assert.AreEqual(129, resultCount);

                ObjectQuery testOQ = new ObjectQuery();
                //testOQ.EasyQuery(easySession).From(productModel.GetType()).Where().
                //var result = testOQ.DeleteQuery("DELETE FROM Production.ProductModel WHERE ProductModelID IN (:list)", easySession).SetParameterList("list", new int[] { 1, 2, 3 }, typeof(int)).Execute();

                resultCount = productModel.Count(easySession);
                Assert.AreEqual(126, resultCount);
            }
        }