Пример #1
0
        private static IList OnList(Type type, IConnectinContext cc, string from, Expression expression, Region region, string orderby, string groupby)
        {
            Command cmd = Command.GetThreadCommand().AddSqlText(from);// new Command(from);

            if (expression != null)
            {
                expression.Parse(cmd);
            }

            if (!string.IsNullOrEmpty(groupby))
            {
                cmd.Text.Append(" Group by ").Append(groupby);
            }

            if (!string.IsNullOrEmpty(orderby))
            {
                cmd.Text.Append(" Order by ").Append(orderby);
            }
            return(cc.List(type, cmd, region));
        }