示例#1
0
        private LazyQueryOperation <T> ProcessLazyQuery()
        {
            if (queryOperation == null)
            {
                foreach (var databaseCommands11 in ShardDatabaseCommands)
                {
                    foreach (var key in databaseCommands11.OperationsHeaders.AllKeys.Where(key => key.StartsWith("SortHint")).ToArray())
                    {
                        databaseCommands11.OperationsHeaders.Remove(key);
                    }
                }

                ExecuteBeforeQueryListeners();
                queryOperation = InitializeQueryOperation();
            }

            var lazyQueryOperation = new LazyQueryOperation <T>(queryOperation, afterQueryExecutedCallback, includes, ShardDatabaseCommands.First().OperationsHeaders);

            return(lazyQueryOperation);
        }