views:

57

answers:

1

Hey guys,

I was wondering--what part of Subsonic 3 needs to be modified to support a different database under a Simple Repository scenario? I haven't found any documentation on this point. Subsonic 3 seems to be all about the T4 templates but when I check out the Subsonic project sources I don't see any T4 templates in there...so where/how do I add support for another database?

Thanks,

Alex

+2  A: 

Hi Alex - no part of SubSonic needs to be modified for SimpleRepo - just change your connection string and be sure to change the provider (part of the connection string) as well. So, the default connection might be:

connectionString="server=localhost;database=northwind;user id=bob;password=*****" provider="System.Data.SqlClient"

Change that to be the connection string you want, and the provider to your DB provider. MySQL would be something like "MySql.Data.MySqlClient" and SQLite would "System.Data.SQLite" (I think).

SubSonic will do the rest.

Rob Conery
Rob, I appreciate the quick answer. However, I can't seem to get Subsonic 3 working with Sql Server CE. From what I've read it isn't supported in Subsonic 3 natively. Is that incorrect?
Alex