×
Getting new Releases

To get notified on new releases you may follow us on twitter @expandframework or subscribe in our main RSS feed.

Topic-icon World Creator database updating

More
2 months 1 week ago #10931 by Marek
Marek created the topic: World Creator database updating
Hello
I have my own process of updating database in my application, but WC database is updating first and there is no way to inject custom logic.
There is CompatibilityCheckerApplication class which in OnDatabaseVersionMismatch calls e.Updater.Update(). Generally user need to confirm update or just cancel it. When main db DatabaseVersionMismatch is called, wc database is already updated. Can you make small change that will enable to control wc updating process?

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago #10932 by Tolis
Tolis replied the topic: World Creator database updating
exposing the CompatibilityCheckerApplication so you can subclass it I guess is sufficient for your scenario?

To get notified on new releases follow us on twitter @expandframework or subscribe RSS feed. I am also available @tolisss . Also see How to debug eXpand

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago #10933 by Tolis
Tolis replied the topic: World Creator database updating
from next minor 17.1.4.3 you can subscribe to the CustomWorldCreatorApplication event to provide your own version where you can override any method you want like the OnDatabaseVersionMismatch
public override void Setup(XafApplication application){
            base.Setup(application);
            application.FindModule<WorldCreatorModule>().CustomWorldCreatorApplication+=OnCustomWorldCreatorApplication;
        }

        private void OnCustomWorldCreatorApplication(object sender, CustomWorldCreatorApplicationArgs e){
            e.WorldCreatorApplication=new CustomWorldCreatorApplication(e.ObjectSpaceProvider, e.Modules);
        }

        class CustomWorldCreatorApplication:WorldCreatorApplication {
            public CustomWorldCreatorApplication(IObjectSpaceProvider objectSpaceProvider, IEnumerable<ModuleBase> moduleList) : base(objectSpaceProvider, moduleList){
            }

            protected override void OnDatabaseVersionMismatch(DatabaseVersionMismatchEventArgs e){
                base.OnDatabaseVersionMismatch(e);
            }
        }

To get notified on new releases follow us on twitter @expandframework or subscribe RSS feed. I am also available @tolisss . Also see How to debug eXpand
The following user(s) said Thank You: Marek

Please Log in or Create an account to join the conversation.

More
2 months 1 week ago #10934 by Marek
Marek replied the topic: World Creator database updating
Thank you :) This is exactly what i need.

Please Log in or Create an account to join the conversation.

Time to create page: 0.187 seconds