Search code examples
c#sql-serverormsubsonic

Subsonic - Active Records doesn't grab all my tables


I have a real simple database with 8 tables:

  • Activities
  • Classes
  • Companies
  • Computers
  • Customers
  • Services
  • Users
  • Vendors

but whenever I include the TT files for Subsonic, it seems to only create classes for two of my tables, Classes and Customers.

What is the reason for this, and how can I fix it?

Config for SubSonic:

const string Namespace = "SimpleTimerDatabase.Data";
const string ConnectionStringName = "SimpleTimerDatabase.Properties.Settings.QTimerConnectionString";

//This is the name of your database and is used in naming
//the repository. By default we set it to the connection string name
const string DatabaseName = "QTimer";

And my connection Strings:

<connectionStrings>
    <add name="SimpleTimerDatabase.Properties.Settings.QTimerConnectionString"
        connectionString="Data Source=THESTUDIO\SQLEXPRESS;Initial Catalog=QTimer;Integrated Security=True"
        providerName="System.Data.SqlClient" />
</connectionStrings>

Solution

  • Subsonic doesn't do any checking of column names, so when I had a column titled "class" and another titled "1099", the autogenerated code couldn't compile because those are invalid identifiers.