Ends in:
3 DAYS
20 HRS
46 MIN
34 SEC
Ends in:
3 D
20 H
46 M
34 S
Open Closed

There is a weird situation with AbpDynamicOptionsManager usage. #2579


User avatar
0
selinkoykiran created

Hello all, NOTE => First of all we've found this usage by searching from your code, could you please share a usage of DynamicOptions inside your docs , too ? The usage sample like below : We have an optionsManager Then an options class :

And the configuration is like below :

We are settings OdmsOptions inside SettingAppService like below :

When a person changes the options from setting page, we are just updating our options with Set() method call. After that we want to get the latest options with injecting this Option class like below :

But after injecting this OdmsOptions class we are getting default options, not setted options. Why the behaviour is like that. We needed to call OdmsOptions.SetAsync(); method again to get latest settings, Why do we need another Set method call , we've already done this setting in another place. When we are injecting the Odmsoptions , should we get the latest changes without calling another set method ?

Could you check and help please? Thank you.

  • ABP Framework version: v5.1.1.
  • UI type: MVC
  • DB provider: EF Core
  • **Tiered (MVC) : yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    We needed to call OdmsOptions.SetAsync(); method again to get latest settings,

    This is design. See https://github.com/abpframework/abp/pull/6333

  • User Avatar
    0
    selinkoykiran created

    Ok thank you, we'll be calling SetAsync() method before.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 02, 2024, 12:35