Skip to content

Setting up your Database Connection

BrewDawg edited this page Feb 9, 2013 · 1 revision

There are two ways to register connections.

  • Via the app.config or web.config file
  • Config-less setup (required for Mono Touch)

Config file

  <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>

Config-less Setup

Clone this wiki locally