GetMemberEntityCollections - LLBLGen 5.8.0

Posts   
 
    
Kodiak
User
Posts: 92
Joined: 13-Apr-2009
# Posted on: 01-May-2021 10:52:23   

Hi Guys,

Just upgraded from LLBLGen 4 to 5.8 for a Project.

We were using Adapter and had a class like:

public partial class CommonEntityBase
{

        public IEnumerable<CommonEntityBase> GetDirtyParents()
        {
            return GetDependentRelatedEntities().Where(x => x.IsDirty).Cast<CommonEntityBase>();
        }

        public IEnumerable<CommonEntityBase> GetDirtyChildren()
        {
            return GetMemberEntityCollections().SelectMany(x => x.DirtyEntities).Cast<CommonEntityBase>();
        }
}

These methods don't seem to exist in 5.8 - what would be the correct way of adding these methods to the CommonEntityBase like above?

Thanks for your help!

Kodiak
User
Posts: 92
Joined: 13-Apr-2009
# Posted on: 01-May-2021 11:05:13   

Is this an acceptable substitute?

public IEnumerable<CommonEntityBase> GetDirtyChildren()
{
            var childEntities = GetMemberEntityCollectionCoreInstances().Cast<CommonEntityBase>();
            return childEntities.Where(x => x.IsDirty);
}
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 02-May-2021 09:01:27   

Yes that method should do it simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Kodiak
User
Posts: 92
Joined: 13-Apr-2009
# Posted on: 02-May-2021 09:42:17   

Awesome! Thanks Frans! simple_smile

Otis wrote:

Yes that method should do it simple_smile