Ejemplo n.º 1
0
        public void Now()
        {
            IFunction func = (IFunction)sql.Val(() => SqlExp.Now());

            QueryResult result = engine.Compile(func);

            Assert.Equal("NOW()", result.Sql);
            Assert.Equal(new Dictionary <string, object>(), result.Parameters);
        }
        public void Now()
        {
            Exception ex = Assert.Throws <InvalidOperationException>(() => SqlExp.Now());

            Assert.Equal("Only for expressions.", ex.Message);
        }