public void SelectStatementDoesNotRenderPropertyNameAsAlias()
        {
            var sqlExpression = new DefaultSqlExpression <UserDecorated>(Database);

            sqlExpression.Select(x => new { x.IsMale, x.Name });
            var selectStatement = sqlExpression.Context.ToSelectStatement();

            Assert.AreEqual("SELECT [is_male], [Name] \nFROM [Users] UD", selectStatement);
        }
        public void SelectStatementDoesNotRenderPropertyNameAsAlias()
        {
            var sqlExpression = new DefaultSqlExpression <UserDecorated>(Database);

            sqlExpression.Select(x => new { x.IsMale, x.Name });
            var selectStatement = sqlExpression.Context.ToSelectStatement();

            string expected = string.Format("SELECT {0}, {1} \nFROM {2}",
                                            TestDatabase.DbType.EscapeSqlIdentifier("is_male"),
                                            TestDatabase.DbType.EscapeSqlIdentifier("Name"),
                                            TestDatabase.DbType.EscapeTableName("Users"));

            Assert.AreEqual(expected, selectStatement);
        }
 public void SelectStatementDoesNotRenderPropertyNameAsAlias()
 {
     var sqlExpression = new DefaultSqlExpression<UserDecorated>(Database);
     sqlExpression.Select(x => new {x.IsMale, x.Name});
     var selectStatement = sqlExpression.Context.ToSelectStatement();
     Assert.AreEqual("SELECT [is_male],[Name] \nFROM [Users]", selectStatement);
 }
        public void SelectStatementDoesNotRenderPropertyNameAsAlias()
        {
            var sqlExpression = new DefaultSqlExpression<UserDecorated>(Database);
            sqlExpression.Select(x => new {x.IsMale, x.Name});
            var selectStatement = sqlExpression.Context.ToSelectStatement();

            string expected = string.Format("SELECT {0}, {1} \nFROM {2}",
                                            TestDatabase.DbType.EscapeSqlIdentifier("is_male"),
                                            TestDatabase.DbType.EscapeSqlIdentifier("Name"),
                                            TestDatabase.DbType.EscapeTableName("Users"));

            Assert.AreEqual(expected, selectStatement);
        }