Skip to content

Instantly share code, notes, and snippets.

@orellabac
Created August 27, 2019 18:12
Show Gist options
  • Save orellabac/a644a07dc02094698730f6619d1ba071 to your computer and use it in GitHub Desktop.
Save orellabac/a644a07dc02094698730f6619d1ba071 to your computer and use it in GitHub Desktop.
Config File Fragment to configure ADOFactory
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="AdoFactories" type="UpgradeHelpers.DB.AdoFactoriesConfigurationSection, UpgradeHelpers.DB.Essentials" allowExeDefinition="MachineToApplication" allowLocation="true" />
<section name="AdoIdentityColumns" type="UpgradeHelpers.DB.AdoIdentityColumnsConfigurationSection, UpgradeHelpers.DB.Essentials" allowExeDefinition="MachineToApplication" allowLocation="true" />
</configSections>
<connectionStrings>
</connectionStrings>
<AdoFactories>
<!--
The following section declares some of the most common factories. It can be modified in order to accomplish your needs.
The factory declaration with the "isdefault" attribute set to true will be used by the upgraded application as the current provider factory.
The database type attribute can take one of the following values
* SQLServer: when the application interacts wiht Ms SQL Server
* Oracle: when the application interacts wiht Oracle
* Access: when the application interacts wiht Ms Access
* Undefined: when none of the previous is being used
-->
<Factories>
<add name="SQLServer" factorytype="System.Data.SqlClient" isdefault="true" databasetype="SQLServer" />
<!-- MS SQL Server -->
<add name="Oracle" factorytype="System.Data.OracleClient" isdefault="false" databasetype="Oracle" />
<!-- Oracle -->
<add name="Oledb" factorytype="System.Data.OleDb" isdefault="false" databasetype="Access" />
<!-- Any database through Oledb -->
<add name="ODBC" factorytype="System.Data.Odbc" isdefault="false" databasetype="Access" />
<!-- Any database through ODBC -->
</Factories>
</AdoFactories>
<AdoIdentityColumns>
</AdoIdentityColumns>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment