public EntityInfo TargetEntity; //for delete, insert, update #endregion Fields #region Constructors public LinqCommand(EntityQuery query, LinqCommandType commandType, LinqCommandKind kind, EntityInfo targetEntity) { Kind = kind; CommandType = commandType; Query = query; TargetEntity = targetEntity; }
public DynamicLinqCommand(EntitySession session, Expression queryExpression, LinqCommandKind kind = LinqCommandKind.Dynamic, LinqOperation op = LinqOperation.Select, EntityInfo updateEntity = null) : base(session, kind, op) { QueryExpression = queryExpression; UpdateEntity = updateEntity; LinqCommandAnalyzer.Analyze(this); }
internal LinqCommand(LinqCommandInfo info, EntityInfo targetEntity, object[] parameterValues) { Info = info; Kind = info.CommandKind; CommandType = info.CommandType; TargetEntity = targetEntity; ParameterValues = parameterValues; Util.Check(ParameterValues.Length == info.Lambda.Parameters.Count, "Parameter values count ({0}) does not match parameter count ({1}) in lambda: {2}.", parameterValues.Length, Info.Lambda.Parameters.Count, Info.Lambda); }
public LinqCommandInfo(LinqCommand command, QueryOptions options, LinqCommandFlags flags, List<Type> entityTypes, string cacheKey, List<ParameterExpression> externalParameters, List<LambdaExpression> includes) { CommandType = command.CommandType; CommandKind = command.Kind; Options = options; Flags = flags; EntityTypes = entityTypes; CacheKey = cacheKey; ExternalParameters = externalParameters; Includes = includes; }
public LinqCommandInfo(LinqCommand command, QueryOptions options, LinqCommandFlags flags, List <Type> entityTypes, string cacheKey, List <ParameterExpression> externalParameters, List <LambdaExpression> includes) { CommandType = command.CommandType; CommandKind = command.Kind; Options = options; Flags = flags; EntityTypes = entityTypes; CacheKey = cacheKey; ExternalParameters = externalParameters; Includes = includes; }
public LinqCommand(EntitySession session, LinqCommandKind kind, LinqOperation operation) { Session = session; Kind = kind; Operation = operation; }
public LinqCommand(EntityQuery query, LinqCommandType commandType, LinqCommandKind kind, EntityInfo targetEntity) { Kind = kind; CommandType = commandType; Query = query; TargetEntity = targetEntity; }
public override bool IsSqlTier(System.Linq.Expressions.Expression expression, LinqCommandKind queryUse) { //MS SQL does not allow comparison operations in SELECT list if (expression.Type == typeof(bool)) { switch (expression.NodeType) { case ExpressionType.LessThan: case ExpressionType.LessThanOrEqual: case ExpressionType.GreaterThan: case ExpressionType.GreaterThanOrEqual: case ExpressionType.Equal: case ExpressionType.NotEqual: return false; //means SQL wouldn't support it } }//if return base.IsSqlTier(expression, queryUse); }
public override bool IsSqlTier(System.Linq.Expressions.Expression expression, LinqCommandKind queryUse) { //MS SQL does not allow comparison operations in SELECT list if (expression.Type == typeof(bool)) { switch (expression.NodeType) { case ExpressionType.LessThan: case ExpressionType.LessThanOrEqual: case ExpressionType.GreaterThan: case ExpressionType.GreaterThanOrEqual: case ExpressionType.Equal: case ExpressionType.NotEqual: return(false); //means SQL wouldn't support it } }//if return(base.IsSqlTier(expression, queryUse)); }