Config for Subsonic in Winform


April 11, 2009
Don't know what to read next? Check out the list of popular posts. People like them, they should be good.

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 >

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

nice tutorial

August 17th, 2011

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

December 14th, 2011
Rana

This doesnt work for me.

I tried and even I build subsonic2.2 using framework 4.0 but It is the same.

Please help me out to add reference of SubSonic2.2 with .NET framework 4.0 windows Application(Winforms)

Please write or reply through email.

Thanks in advance.

Trackbacks
Leave a Reply