public SelectOperation <T> OrderBy <TResult>(Expression <Func <T, TResult> > columnSelector) { ExpressionResolver expressionResolver = new ExpressionResolver(); string columnName = expressionResolver.ResolveOrderBy <T, TResult>(columnSelector); if (_orderBy == null) { _orderBy = @" ORDER BY " + columnName; } else { _orderBy += ", " + columnName; } return(this); }
public SelectOperation <T> Where(Expression <Func <T, bool> > predicate) { if (predicate == null) { throw new ArgumentNullException(nameof(predicate)); } if (_where != null) { throw new InvalidOperationException("The 'Where' method already used."); } ExpressionResolver expressionResolver = new ExpressionResolver(); _where = @" WHERE " + expressionResolver.ResolveWhere(predicate); return(this); }