public SelectBuilder <T> OrderByDesc(Expression <Func <T, object> > parameter) { var param = QueryCreate.GetParameterName(parameter); AddStatement(QueryHelper.OrderBy(param, false)); return(new SelectBuilder <T>(Build())); }
public SelectBuilder <T> Aggregate <T>(Expression <Func <T, object> > firstParameter, Expression <Func <T, object> >[] parameters, bool isCount) where T : class { var p1 = QueryCreate.GetParameterName(firstParameter); var p2 = string.Empty; if (parameters != null) { p2 = QueryCreate.GetParameterName(parameters); } return(isCount ? new SelectBuilder <T>(QueryHelper.SelectCount <T>(p1, p2)) : new SelectBuilder <T>(QueryHelper.SelectMax <T>(p1, p2))); }
public SelectBuilder <T> Select <T>(params Expression <Func <T, object> >[] parameters) where T : class => new SelectBuilder <T>(QueryHelper.Select <T>(QueryCreate.GetParameterName(parameters)));