Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top