문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top