Custom GUID Primary Key

Posts   
 
    
swegele
User
Posts: 33
Joined: 25-Jan-2007
# Posted on: 25-Jan-2007 01:12:10   

Hi, I am evaluating whether this product will work for us and I like what I see. The only question I have so far is this.

We generate our own unique primary keys that end up as a string. I haven't seen any posts on how you would do this. Would you put custom code in the factory method that calls our pk generation routine?

Thanks

Sean

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 25-Jan-2007 07:19:16   

You can just plug in your code inside the generated entity classes code, within pre-defined User Code Regions. Please refer to the LLBLGen Pro manual: Using the generated code -> Adding your own code to the generated classes

swegele
User
Posts: 33
Joined: 25-Jan-2007
# Posted on: 29-Jan-2007 03:19:24   

I think it will work better for me to hide LLBLGen objects as private members inside BL objects based on CSLA2 framework.

This way I can have one public Create() exposed with my custom primary key logic.

Thanks to Wayne for good suggestions on this forum about this subject.

Sean