EF, Data Repository with LLBLGen Pro

Posts   
 
    
bhsstudio
User
Posts: 2
Joined: 16-Feb-2012
# Posted on: 06-Aug-2012 01:30:06   

Hi everyone, I have a question about how to generate code by using Data Repository.

I have found this link, which is very helpful.

http://www.mattjcowan.com/funcoding/2011/09/25/llblgen-ef-repository-pattern/

I noticed that in the above article, the author is using some kind of template file.

My question is how to generate the template file? Where can I learn it?

Thanks everyone

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 06-Aug-2012 02:24:32   

Yes, Matt Cowan is using LLBLGen template system to regenerate the Repository classes. To learn more about it read LLBLGen SDK Documentation - The template system.

Using the Matt Cowans's templates is very easy:

  1. Grab the source code from the article and place copy the genmembership\llbl\tasks ans genmembership\llbl\templates folders into some place you can use later, like *C:\Dev\LLBLGen\AdditionalTasksAndTemplates*

  2. Open your v3.x LLBLGen project you want to use. Then go to Project->Settings->General, there change the following settings:

  3. Additional Taks folders : C:\Dev\LLBLGen\AdditionalTasksAndTemplates\Tasks

  4. Additional Templates folders : C:\Dev\LLBLGen\AdditionalTasksAndTemplates\Templates

  5. Now go to Tools->Refresh Code Generation Metadata. This will update the template system to include the newly additional tasks and templates.

  6. Click [F7] (Generate Code). On the "Selected Preset" field, choose the Custom.EntityFramework.v4(...) and click on "Start generator". This will create the repository files.

Hope helpful wink

David Elizondo | LLBLGen Support Team
bhsstudio
User
Posts: 2
Joined: 16-Feb-2012
# Posted on: 06-Aug-2012 03:14:44   

Thank you for your reply.

Actually my question is how to create those template files? Because I don't want to use the UoW pattern and I would like to use my own pattern.

Thanks again.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 06-Aug-2012 10:02:54   

In the build-in template editor? It in general helps to glance over the ToC of the docs wink

http://www.llblgen.com/documentation/3.5/Designer/hh_goto.htm#How%20To/TemplatesEdit.htm

Frans Bouma | Lead developer LLBLGen Pro