예제 #1
0
파일: Sql.cs 프로젝트: dev-nori/dotnet-orm
        private void ParseExpression()
        {
            var expression = Expression;

            Console.WriteLine(ExpressionTranslateTemp.Parse(expression, 0));
            Clauses.AddRange(ExpressionTranslate.ParseClause(expression));
        }
예제 #2
0
        public string Generate()
        {
            foreach (var clause in clauses)
            {
                if (clause is WhereClause whereClause)
                {
                    DefaultType = ExpressionTranslate.ParseWhereType(whereClause);
                }
                else if (clause is JoinClause joinClause)
                {
                    JoinType = ExpressionTranslate.ParseJoinType(joinClause);
                }
                else if (clause is SelectClause selectClause)
                {
                    NewType = ExpressionTranslate.ParseNewType(selectClause);
                }
            }

            return(stringBuilder.ToString());
        }