/// <summary>
        /// This method supports the Enterprise Library infrastructure and is not intended to be used directly from your code.
        /// Returns the default database name from the configuration in the <paramref name="configurationSource"/>, if the
        /// value for <paramref name="name"/> is <see langword="null"/> (<b>Nothing</b> in Visual Basic).
        /// </summary>
        /// <param name="name">The current name.</param>
        /// <param name="configurationSource">The source for configuration information.</param>
        /// <returns>The default database name if <paramref name="name"/> is <see langword="null"/> (<b>Nothing</b> in Visual Basic),
        /// otherwise the original value for <b>name</b>.</returns>
        public string MapName(string name, IConfigurationSource configurationSource)
        {
            if (name == null)
            {
                DynamicQueryConfigurationView view = new DynamicQueryConfigurationView(configurationSource);
                return(view.DefaultDynamicQueryProvider);
            }

            return(name);
        }
Ejemplo n.º 2
0
        private DynamicQueryData GetConfiguration(string id, IConfigurationSource configurationSource)
        {
            DynamicQueryConfigurationView view = new DynamicQueryConfigurationView(configurationSource);

            return(view.GetDynamicQueryData(id));
        }