Asp – Setting up SubSonic with Databases other than SQL Server

asp.netsubsonicsubsonic3

I am currently using SubSonic (2.2 and 3) for some ASP.NET projects and have managed to get them working with SQL Server (using ActiveRecord). However, I also want to know how to set it up with other (open source) databases, e.g. PostgreSQL and SQLite. This is so I can use it on a web host without SQL Server on. The providers I have found are:

Anyone have any experience with SubSonic know how to do this (some sample demo would be good – just a basic primer on querying would be fine)? Non-ASP.NET MVC though (not got into it yet). I have only basic knowledge of SQLite (basically using SQLite Manager in Firefox and querying it via PHP Data Objects) and have not used Postgresql, but assume it would be more scalable than SQLite.

Best Answer

For version 3

  • PostgreSQL: There aren't any templates for postgres at the moment so you'd need to create the templates yourself

  • SQLite - The steps should be as follows:

    • Add a reference to System.Data.SQLite
    • Look in the TemplateProviders folder you'll find a SQLite.ttinclude which you'll need to drop into your project instead of SQLServer.ttinclude.
    • Change the .tt files that reference SQLServer.ttinclude to reference SQLite.ttinclude instead.
Related Topic