Click here to Skip to main content
15,897,718 members
Articles / Database Development / SQL Server

Overview of XQuiSoft Data Using the Provider Pattern (Open Source)

Rate me:
Please Sign up or sign in to vote.
3.59/5 (12 votes)
16 Jun 2009BSD8 min read 40.9K   28  
A data abstraction layer for .NET applications. Write your application code to be database neutral. Swap out the type of database your application uses without updating or even recompiling your business components.
<?xml version="1.0"?>

<configuration>
  <configSections>
    <sectionGroup name="XQuiSoft.Data">
      <section name= "DataManager" type="XQuiSoft.Data.DataManagerConfiguration, XQuiSoft.Data" />
    </sectionGroup>
    <sectionGroup name="XQuiSoft.Data.Demo">
      <section name= "EmployeeManager" type="XQuiSoft.Data.Demo.EmployeeManagerConfiguration" />
    </sectionGroup>
  </configSections>

  <appSettings file="Environment.config">
    <add key="ENVCODE" value="LOCAL" />
  </appSettings>
  <connectionStrings/>
  <XQuiSoft.Data>
    <DataManager defaultProviderAppSettingName="ENVCODE">
      <providers>
        <add name="Prod"
          type="XQuiSoft.Data.SqlClient.SqlDataProvider, XQuiSoft.Data"
          connectionString="Data Source=.\SQLSERVEREXP,1454;Initial Catalog=Test;User ID=DemoUser;Password=password"
          />
        <add name="LOCAL"
					type="XQuiSoft.Data.SqlClient.SqlDataProvider, XQuiSoft.Data"
					connectionString="User ID=testuser;Password=demo;Server=LANG-LT2\sqlexpress;Initial Catalog=Test2"
					/>
      </providers>
    </DataManager>
  </XQuiSoft.Data>
  
  <XQuiSoft.Data.Demo>
    <EmployeeManager>
      <providers>
        <add name="Default" type="XQuiSoft.Data.Demo.Data.DbEmployeeProvider, XQuiSoft.Data.Demo" />
      </providers>
    </EmployeeManager>
  </XQuiSoft.Data.Demo>
  
  <system.web>
    <customErrors
      mode="Off"
    />
    <compilation
      defaultLanguage="c#"
      debug="true"
    />
    <authentication mode="None" />
    <authorization>
      <allow users="*" /><!-- Allow all users -->
    </authorization>
    <trace
      enabled="false"
      requestLimit="10"
      pageOutput="true"
      traceMode="SortByTime"
      localOnly="true"
    />
    <sessionState
      mode="InProc"
      stateConnectionString="tcpip=127.0.0.1:42424"
      sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
      cookieless="false"
      timeout="20"
    />
    <globalization
      requestEncoding="utf-8"
      responseEncoding="utf-8"
    />
  </system.web>
</configuration>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The BSD License


Written By
Web Developer Nexul Software LLC
United States United States
Mike has worked in the .Net platform since the beta 2 release of version 1.0. Before that he worked on VB6 windows forms applications automating other applications such as AutoCAD and "Intent".

Mike has released a number of open source applications in javascript and C#.Net. Most of them can be found on github.
github/michael-lang

You can find older .Net open source projects on sourceforge at:
http://sourceforge.net/users/versat1474/

Mike is currently blogging at candordeveloper.com

Comments and Discussions