コード例 #1
0
        public void TestExists()
        {
            var classicWay = Exists.InTable("table").Where("1", Is.DifferentWith, "1");
            var dbalWay    = new Table("table", "colA", "colB").Exists().Where("1", Is.DifferentWith, "1");

            Assert.AreEqual(classicWay.Sql, dbalWay.Sql);
        }
コード例 #2
0
ファイル: TestExists.cs プロジェクト: esandre/Lib
        public void Test()
        {
            var exists = Exists.InTable("test").Where("a", Is.GreaterThan, "b");

            Assert.AreEqual("SELECT EXISTS (SELECT 1 FROM test WHERE a > @" + Math.Abs("b".GetHashCode()) + ")", exists.Sql);
        }