Search code examples
c#asp.net-mvcsubsonicsubsonic3

SubSonic 3 Class Table name generate issue


i´m a novice in the Subsonic, and i have a isseu about the way how it work´s.

When subsonic generate de .cs file for default the name of the classes comes in LowerCase. I have edited the MySql template using the funciton "ToTitleCase()" it´s resolved a peace of my problem, if my table name is Products i´ts ok, but if is that a composite name like ProductsType the class name comes "Productstype".

I see the Columns names comes exactly same Case like it´s in the Database.

So i could not found where in the template code I have to do the modification that the names of the class comes like the table name.(in same Case Sensitive)

Any ideas for that ?

Many Thanks


Solution

  • Apologies, I may be wrong on this as I use the vb.net rather than c# subsonic templates but hunt down the function CleanUp within settings.ttinclude.

    Here you should be able to do a replace on the tableName passed in to the case of your liking using a switch statement. Hopefully you don't have too many!