×

Notice

The forum is in read only mode.
×
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

  • Marek
  • Marek's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
11 months 5 days ago #10931 by Marek
World Creator database updating was created by Marek
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?
More
11 months 5 days ago #10932 by Tolis
Replied by Tolis on 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
More
11 months 5 days ago #10933 by Tolis
Replied by Tolis on 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
  • Marek
  • Marek's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
11 months 4 days ago #10934 by Marek
Replied by Marek on topic World Creator database updating
Thank you :) This is exactly what i need.
Moderators: expand
Time to create page: 0.204 seconds