private static object OnListFirst(Type type, IConnectinContext cc, string from, Expression expression, 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.ListFirst(type, cmd)); }