예제 #1
0
파일: Query.aspx.cs 프로젝트: hasi/EasyData
        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);
            }
        }
예제 #2
0
파일: Query.aspx.cs 프로젝트: hasi/EasyData
        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);
            }
        }