Migration from 2.6 to 3.1 - Entity Sub Classes

Posts   
 
    
jg
User
Posts: 25
Joined: 29-Dec-2011
# Posted on: 29-Dec-2011 00:33:39   

I am relatively new to LLBLGen and I took over this project that has been around for several years when the other guy left the company (So I can't exactly ask him for help). I just downloaded the trial version of LLBLGen 3.1 and I am trying to upgrade our code from our 2.6 version to 3.1.

The problem I am having is that when I generated the code from 3.1 the Entity Sub Classes were removed from the project and none of the subclass files were updated. Is there some configuration that was somehow missed in the migration that controls this? We have a lot of custom code in our Sub Classes that was all within the __LLBLGENPRO_USER_CODE regions which I would assume would be preserved in the upgrade.

Version numbers: From: 2.6 Final Oct 9, 2009 To: 3.1 Final Trial Sep 30, 2011

We are using .Net 2.0 and the Adapter template group.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 29-Dec-2011 04:06:45   

When you generate code, there is a tab 'Task queue to execute' where you can pick the desired preset. In there you should select AdapterTwoClasses. I think you selected AdapterGeneral. Please check that. BTW now is preferred partial classes so if you can migrate your subClasses code into partial classes that would be even better.

David Elizondo | LLBLGen Support Team
jg
User
Posts: 25
Joined: 29-Dec-2011
# Posted on: 29-Dec-2011 16:36:16   

Thanks! That was it. I knew it had to be something simple.

Is there any kind of documentation to help me get started migrating my subClasses to partial classes?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 29-Dec-2011 18:26:04   

jg wrote:

Thanks! That was it. I knew it had to be something simple.

Good wink

jg wrote:

Is there any kind of documentation to help me get started migrating my subClasses to partial classes?

No, there is no docs for this. But it's quite simple:

Take your subclass, which should look like this:

public class MyCustomerEntity: CustomerEntity
{
...
}

then change it to:

public partial class CustomerEntity
{
...
}

and that's it. Now remove any reference to the subclasses in you business/gui code and use the base class instead. A simple find/replace should be enough.

David Elizondo | LLBLGen Support Team