Пример #1
0
        public void TestSelectWhere()
        {
            var where = BinaryExpression.GT(
                new ColumnExpression("column1"),
                new ValueExpression(5, PreparedStatementTypeMapper.Map(typeof(int)), "test")
                );

            var selectQuery = new SelectQuery <TestEntity>(
                null,
                TestEntity,
                TestColumns,
                new List <IWhereFilter>()
            {
                where
            },
                new List <Join>());

            Assert.AreEqual("SELECT t1.column1, t1.column2 FROM table_name t1 WHERE t1.column1 > @test;", selectQuery.AsSqlString());
        }