Config for Subsonic in Winform


April 11, 2009
If you're new to my website, why don't get my latest posts using RSS Feed or by Email.

another tip »

To use Subsonic as an DAL in your windows application, you will need to do a bit more work then for Web App.

In all the project need to access to the database using Subsonic, you will need to add a references to: Subsonic.DLL, System.Web, System.configuration as Subsonic require all those library to run.

<?xml version="1.0" encoding="utf-8" ? >
<configuration >
	<configSections >
		<section name="SubSonicService"
				 type="SubSonic.SubSonicSection, SubSonic"
				 requirePermission="false" / >
	</configSections >
	<connectionStrings >
		<add name="ConnectionString4SubSonic"
            connectionString="Data Source=___;Initial Catalog=___;User ID=__;Password=_____"
            providerName="System.Data.SqlClient" / >
	</connectionStrings >
	<SubSonicService defaultProvider="ORM" >
		<providers >
			<clear/ >
			<add	name="ORM" type="SubSonic.SqlDataProvider, SubSonic"
					connectionStringName="ConnectionString4SubSonic"
					generatedNamespace="___"
					includeTableList="Tbl*"
					regexDictionaryReplace="tbl+,"/ >
		</providers >
	</SubSonicService >
</configuration >
  • Delicious

Some more useful articles for you

Under Category: C#.NET Code
Article Tags: ,
June 3rd, 2009
mtung05

nice tutorial

Trackbacks
Leave a Reply