How to automate the Code Generator (advanced)?

Posts   
 
    
Spaunk
User
Posts: 18
Joined: 18-Feb-2006
# Posted on: 23-Feb-2006 11:48:19   

Hello,

First a short introduction what we do manually (a little simplified)!

  1. .Net 2.0, Self Servicing, LLBLGen v1.0.2005.1 Designer Core (19.02.2006)
  2. We have an automatically generated reference database on which we run the code generator. This DB contains only tables (no views, no procedures, etc.). The DB also contains no data.
  3. When we start the generator, we open our pre-saved LLBLGen Project. In this project all necessary settings are set. But there is no table added. Thus it is an 'empty' project.
  4. Now we refresh the catalogue.
  5. Add all tables from the catalogue.
  6. Set the target folder to the VS-Project Folder.
  7. Save the LLBL Project with a new name.
  8. Generate the code.
  9. ... from here we do further necessary steps. Like, remove compile errors (due to changes to the database structure), update the development database, etc..

Altogether it takes at least 1 hour to update a change in the DB structure until we can continue developing on a new DB structure.

We automated all steps, but one, that are necessary to generate a new Data Access Layer

Ok, so far so good. Now my question: Is there a way to automate the steps 2-7?

Thank you for your help in advance.

PS: Later we want to add some other tasks. E.g. neutralise the table names. The reference database has neutralised table names. For example the table name is 'abcdefg' but the entity name must still be 'address'. So we have to modify step 4. We cannot just map the table name to entity name. Any Idea how to automate this?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 23-Feb-2006 13:15:51   

Please take a look at the command line tools available to you in the extra's section in the customer area. They come with full C# sourcecode, so you can customize them if you want to. Also, please check several preferences in the llblgen pro preferences settings (which are also used by the command line tools) so you can tweak what should happen if new tables/fields etc. are found during a refresh period.

In short, you can fully automate refresh and re-generation of code, and also place an intermediate step in between, for example by writing a small program which uses similar techniques as the commandline tools to rename entities according to a file you write yourself. The object model of the project file is described in the SDK reference manual.

Frans Bouma | Lead developer LLBLGen Pro