public async Task <TResult> ExecuteQuery <TCriteria, TResult>(TCriteria criteria)
            where TCriteria : ISpecifyBagOrigin
        {
            if (criteria.BagOrigin.Equals(ConfigurationManager.AppSettings["ThisRegion.BagOrigin"]))
            {
                return(await _innerExecutor.ExecuteQuery <TCriteria, TResult>(criteria));
            }
            else
            {
                IMultiShardCommandExecutor commandExecutor          = null;
                IMultiShardDatabaseQuery <TCriteria, TResult> query = null;

                try
                {
                    commandExecutor = _container.Resolve <IMultiShardCommandExecutor>("SecondaryRegionMultiShardCommandExecutor");
                    query           = _container.Resolve <IMultiShardDatabaseQuery <TCriteria, TResult> >();
                    return(await commandExecutor.Execute(query.CommandFunc(criteria)));
                }
                finally
                {
                    _container.Release(commandExecutor);
                    _container.Release(query);
                }
            }
        }
        public async Task <TResult> ExecuteQuery <TCriteria, TResult>(TCriteria criteria)
            where TCriteria : ISpecifyBagOrigin
        {
            IMultiShardCommandExecutor commandExecutor          = null;
            IMultiShardDatabaseQuery <TCriteria, TResult> query = null;

            try
            {
                commandExecutor = _container.Resolve <IMultiShardCommandExecutor>();
                query           = _container.Resolve <IMultiShardDatabaseQuery <TCriteria, TResult> >();
                return(await commandExecutor.Execute(query.CommandFunc(criteria)));
            }
            finally
            {
                _container.Release(commandExecutor);
                _container.Release(query);
            }
        }