コード例 #1
0
 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);
 }
コード例 #2
0
ファイル: LinqCommand.cs プロジェクト: yuanfei05/vita
 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);
 }
コード例 #3
0
 private LinqCommandInfo AnalyzeCommand(EntityModel model, LinqCommand command)
 {
     _model   = model;
     _command = command;
     try {
         //include command type and options value into cache key
         AddCacheKey(command.CommandType);
         AnalyzeNode(_command.Query.Expression);
         _command.Locals = _locals;
         AddCacheKey(_options);
         var cacheKey = _cacheKeyBuilder.ToString();
         //Build command info
         var info = new LinqCommandInfo(command, _options, _flags, _entityTypes, cacheKey, _externalParams, _includes);
         info.ResultShape = GetResultShape(_command.Query.Expression.Type);
         return(info);
     } catch (Exception ex) {
         ex.Data["QueryExperssion"] = command.Query.Expression + string.Empty;
         throw;
     }
 }