예제 #1
0
        protected virtual void SetCommand(bool clearQueryHints)
        {
            lock (Query)
            {
                if (QueryNumber == 0 && (DataContext.QueryHints.Count > 0 || DataContext.NextQueryHints.Count > 0))
                {
                    var queryContext = Query.Queries[QueryNumber];

                    queryContext.QueryHints = new List <string>(DataContext.QueryHints);
                    queryContext.QueryHints.AddRange(DataContext.NextQueryHints);

                    QueryHints.AddRange(DataContext.QueryHints);
                    QueryHints.AddRange(DataContext.NextQueryHints);

                    if (clearQueryHints)
                    {
                        DataContext.NextQueryHints.Clear();
                    }
                }

                QueryRunner.SetParameters(Query, DataContext, Expression, Parameters, QueryNumber);
                SetQuery();
            }
        }