Updated files SD.LLBLGen.Pro from Version=5.3 to Version=5.4

Posts   
 
    
kakaiya
User
Posts: 159
Joined: 20-Mar-2004
# Posted on: 15-Oct-2018 12:40:58   

Hi,

We upgraded our project to use latest LLBLGen.

As per docs https://www.llblgen.com/Documentation/5.4/LLBLGen%20Pro%20RTF/migratingcode.htm we are migrating code and having some issue.

" The generated entity classes no longer have a method GetAllRelations() as it was only used by the framework and that functionality has been refactored, so it's no longer needed. If your code needs this functionality, either use IEntityCore.GetAllRelations(), or add a partial class to CommonEntityBase and add the following code: public List<IEntityRelation> GetAllRelationsOfEntity() { return GetEntityStaticMetaData().GetAllRelations(); } "

Above paragraph is from 'Migrating generated code from v5.3 to v5.4' guide.

It says add a partial class to CommonEntityBase - is it to add a new partial class?

Regards,

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 15-Oct-2018 19:09:17   

Create a new file in the same generated project of the CommonEntityBase, and extend the implementation of the class, by using partial class.

That's because if you edit the generated class file, it will be overwritten at the next code generation, so any code extention needs to be in your own file.

kakaiya
User
Posts: 159
Joined: 20-Mar-2004
# Posted on: 16-Oct-2018 13:09:34   

Hi Walaa,

Thank you.

What file and class name should be for this new file.

Regards,

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 16-Oct-2018 17:17:31   

File Name: doesn't matter......(say CommonEntityBaseEx.cs), you can have it a new folder of your own, so it's easily discoverable and recognized. You can name the folder anything that's self explanatory (e.g. CustomCode, or ExtendedClasses)

Class Name: CommonEntityBase.

Please read the documentation link I shared in the previous post, about partial classes.

kakaiya
User
Posts: 159
Joined: 20-Mar-2004
# Posted on: 23-Oct-2018 02:04:09   

Hi Walaa,

Will do, thank you.

Regards,

Kakaiya