/// <summary>
        /// Processes the database element in the SqlMap.config file.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <param name="configurationStore">The configuration store.</param>
        private void ProcessDatabaseElement(Tag element, IConfigurationStore configurationStore)
        {
            MutableConfiguration config = new MutableConfiguration(element.Name);
            config.CreateAttributes(element.Attributes);

            configurationStore.AddDatabaseConfiguration(config);
            element.Configuration = config;
        }
        /// <summary>
        /// Processes the database element in the SqlMap.config file.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <param name="configurationStore">The configuration store.</param>
        private void ProcessDatabaseElement(Tag element, IConfigurationStore configurationStore)
        {
            MutableConfiguration config = new MutableConfiguration(element.Name);

            config.CreateAttributes(element.Attributes);

            configurationStore.AddDatabaseConfiguration(config);
            element.Configuration = config;
        }
        /// <summary>
        /// Adds a database configuration item to the store.
        /// </summary>
        /// <example>
        /// <code>
        /// &lt;database&gt;
        ///  &lt;provider name="SQLite3"/&gt;
        ///  &lt;dataSource name="ibatisnet.sqlmap" connectionString="Data Source=ibatisnet.sqlite;Version=3;"/&gt;
        /// &lt;/database&gt;
        /// </code>
        /// </example>
        public void AddDatabase(IDbProvider dbProvider, string dataSourceConnectionString)
        {
            // hack: serialize the object to IConfiguration so it can eventually be converted back to IDbProvider
            configurationStore.AddProviderConfiguration(ProviderSerializer.Serialize(dbProvider));

            MutableConfiguration database = new MutableConfiguration(ConfigConstants.ELEMENT_DATABASE);

            MutableConfiguration provider = database.CreateChild("provider");

            provider.CreateAttribute(ConfigConstants.ATTRIBUTE_NAME, dbProvider.Id);

            MutableConfiguration dataSource = database.CreateChild("dataSource");

            dataSource.CreateAttribute(ConfigConstants.ATTRIBUTE_NAME, "defaultDataSource");
            dataSource.CreateAttribute("connectionString", dataSourceConnectionString);

            configurationStore.AddDatabaseConfiguration(database);
        }