0

We are upgrading GlassMapper to V5 and installed Glass.Mapper.Sc.90. I have done all the changes and mentioned in http://www.glass.lu/Mapper/documentation/Upgrade-ToV5.html link. After the changes, the solution build successfully.

But at runtime i am getting

Method not found: 'Void Glass.Mapper.Config.set_EnableLazyLoadingForCachableModels(Boolean)'.

Searched many blogs but nothing lead me to the fix. Has anyone got this error? How should i resolve this?

Thanks in Advance, Yeshwanth

1 Answer 1

1

the lazy loading has been completely reworked on v5, and this setting is not there anymore. Check your GlassMapperScCustom.cs file and see if you have it there, then remove it.

On v5 lazy is enabled by default and you can disable it by passing the param model.LazyDisabled() when retrieving your model.

I hope it helps you.

2
  • Neither config nor the GlassMapperScCustom.cs has that setting. I am sure that I am implementing model.LazyDisabled() as mentioned in the Upgrade documentation. But still the above error persists. Any other thoughts? Commented Dec 2, 2021 at 12:11
  • 1
    I learnt that there is problem with my publish and resolved them. The issue is fixed. Thanks @Miguel Minoldo Commented Dec 7, 2021 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.