Hi, i've just converted the templates from the flixon site generator to t4. This makes building your bll/dal even easier. This exercise was really just a learning curve for me in preperation for .net v4 and the entity framework but i thought i'd share my work.
Please note that t4 is a tool built into visual studio and therefore you must have visual studio to do this.
Here's how to get it working:
1. Download and install the t4 toolbox extension from
http://www.codeplex.com/t4toolbox
2. Download the templates from
http://www.flixon.com/MyFiles/Files/...eGenerator.rar
3. Extract the contents of the rar file to a seperate folder and copy into your web project.
4. Open the "Generator.tt" file and modify the settings at the top.
5. Modify the list of providers (line 40 to 44), eg the following will create 2 providers called Content (Categories and Documents table applied) and Users (Users table applied)
var providers = new List<Provider>()
{
new Provider { Name = "Content", Tables = database.Tables.Cast<Table>().ToList().FindAll(t => t.Name == "Categories" || t.Name == "Documents") },
new Provider { Name = "Users", Tables = database.Tables.Cast<Table>().ToList().FindAll(t => t.Name == "Users") }
};
6. Save the file. This will fire off the generator and may take a few minutes.
I've tried to set it out as clear as possible and once you start looking at the code you will see how simple it is to modify the templates to your liking. When you modify a template you need to either save the "Generator.tt" file or right click and click "Run Custom Tool" to trigger the code generator.
Hope this helps.