EF 6 - LazyLoading

Posts   
 
    
ianvink
User
Posts: 393
Joined: 15-Dec-2006
# Posted on: 15-Nov-2017 04:58:10   

LLBL 5.2 EF 6

In my LLBL Project file I have the setting "Enable Lazy Loading on context [ ]" set to not checked.

However, when I generate the code and check the value of the Lazy Loading it's "true"


        private void Initialize()
        {
                         //I added this after code-gen
            var thisIsTrue =this.Configuration.LazyLoadingEnabled;
                        OnContextCreated();
        }

ianvink
User
Posts: 393
Joined: 15-Dec-2006
# Posted on: 15-Nov-2017 05:07:12   

According to the EF 6, the default value is "True"

How can I get LLBL to emit :

LazyLoadingEnabled =false

It emits nothing when the check box is off, it only emits = true when the checkbox is [x] checked.

        //   as navigation properties is enabled. Lazy loading is enabled by default.
        public bool LazyLoadingEnabled { get; set; }

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 15-Nov-2017 10:59:07   

Indeed, the default is 'true' since EF4.

We've fixed it in the hotfix build of 5.2.5 and 5.3.2, now available on the website. It will emit a line which sets it to false if the setting is switched off and not emit anything when the setting is switched on (as the default is true)

Frans Bouma | Lead developer LLBLGen Pro
ianvink
User
Posts: 393
Joined: 15-Dec-2006
# Posted on: 18-Nov-2017 22:42:55   

Hi Frans,

I just downloaded from https://www.llblgen.com/pages/try.aspx but it's still 5.3.1.

Is there another place I should go to get 5.3.2 ?

ianvink
User
Posts: 393
Joined: 15-Dec-2006
# Posted on: 18-Nov-2017 22:45:09   

Wonderful product by the way.

Where product = Software + design + support;

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 19-Nov-2017 09:12:43   

ianvink wrote:

Wonderful product by the way.

Where product = Software + design + support;

smile

It's under my account -> 5.3 -> Hotfixes. We release patches as hotfixes for a few weeks and then wrap them up for a new point release.

Frans Bouma | Lead developer LLBLGen Pro