-
Notifications
You must be signed in to change notification settings - Fork 8
Home
BrewDawg edited this page Feb 9, 2013
·
7 revisions
There are two ways to register connections.
- Via the app.config or web.config file
- Config-less setup (required for Mono Touch)
<configSections>
<sectionGroup name="Tiraggo" type="Tiraggo.Interfaces.tgConfigSettings, Tiraggo.Core">
<section name="connectionInfo"
type="Tiraggo.Interfaces.tgConfigSettings, Tiraggo.Interfaces"
allowLocation="true"
allowDefinition="Everywhere"
restartOnExternalChanges="true"/>
</sectionGroup>
</configSections>
<Tiraggo>
<connectionInfo default="SQLite">
<connections>
<add name="SQLite"
providerMetadataKey="tgDefault"
sqlAccessType="DynamicSQL"
provider="Tiraggo.SQLiteProvider"
providerClass="DataProvider"
connectionString="Data Source=Northwind.db3;Version=3"/>
</connections>
</connectionInfo>
</Tiraggo>
tgConnectionElement conn = new tgConnectionElement();
conn.ConnectionString = "Data Source=Northwind.db3; Version=3;";
conn.Name = "SQLite";
conn.Provider = "Tiraggo.SQLiteProvider";
conn.ProviderClass = "DataProvider";
conn.SqlAccessType = tgSqlAccessType.DynamicSQL;
conn.ProviderMetadataKey = "tgDefault";
tgConfigSettings.ConnectionInfo.Connections.Add(conn);
tgConfigSettings.ConnectionInfo.Default = "SQLite";