Exemplo n.º 1
0
        public void TestConditionParams()
        {
            var sqlRaw = "select * from test t1 join teste2 t2 on t1.id = t2.id and t2.parametro = :parametroTeste";
            var nsql   = new NSQLQuery(sqlRaw);

            var numero = 10;

            nsql.BindParam("parametroTeste", numero);

            var expected = "select * from test t1 join teste2 t2 on t1.id = t2.id and t2.parametro = 10";

            Assert.AreEqual(expected, nsql.ToSql(), true);
        }