I try to using the SQLite in SubSonic.Examples.ActiveRecord project so:
- Add a reference for System.Data.SQLite
- Copy the SQLite.ttinclude and Settings.ttinclude from \T4 Templates\TemplateProviders\ to the Models_Generated\
- Change the <#@ include file="SQLite.ttinclude" #> in the SQLite.ttinclude and Settings.ttinclude
- Change the settings: Namespace, ConnectionStringName, DatabaseName to "Blog" in the Settings.ttinclude file.
I meet two errors when regenerate the code: first one is because of missing a "break" at SQLite.ttinclude line #80
case "long":
case "integer":
sysType= "long";
break; // missing a break
case "guid":
After add a "break" the code file "Context.cs" can generate successfully, but the ActiveRecord.cs can not generate, there is a Warning:
Multiple template directives were found in the template. All but the first one will be ignored. Multiple parameters to the template directive should be specified within one template directive. D:\LP\Study\SubSonic 3 Final\Examples\SubSonic.Examples.ActiveRecord\Models_Generated\Settings.ttinclude 1 4