public void OrElse <TValue>(EntityField <T> schemaField, ComparisonOperator @operator, TValue value) { var valueExpression = ORMQueryExpressions.Value(value); OrElse(QueryExpression.Compare( QueryExpression.Column(schemaField.Column.Name, schemaField.Source.AliasIdentifierExpression), @operator, valueExpression )); AddJoin(schemaField.Source); }
private ValueExpression GetValueExpression(EntityField <T> entityField, T entity) { var interesectedFields = _entityView.ClassToEntityIntersection .IntersectedFields.FirstOrDefault(q => q.RightField == entityField); if (interesectedFields == null) { ExceptionHelper.ThrowEntityFieldNotFound(); } var reader = new ViewReader <T>(entity); var value = reader.Read <object>(interesectedFields.LeftPath); return(ORMQueryExpressions.Value(value)); }
public void Limit(int limit) => _limitExpression = ORMQueryExpressions.Value(limit);
public void Offset(int offset) => _offsetExpression = ORMQueryExpressions.Value(offset);
public void Set <TProperty>(Expression <Func <T, TProperty> > fieldSelector, TProperty value) { Set(fieldSelector, ORMQueryExpressions.Value(value)); }