Ticket T1191645
Visible to All Users

How to always call the database updater in E1344 (for scheme changes based on tenants)

created a year ago (modified a year ago)

[DevExpress Support Team: CLONED FROM T1186787: NavigationManager BaseUrl Not found]

Instead of using the subdomain I refactored the application accordingly to https://github.com/DevExpress-Examples/XAF_how-to-change-connection-to-the-database-at-runtime-e1344/

I use my own service to detect the tennant instead of a drop down (works)

However, when I log out and login with a different tennant, it will fail, because the database updater is not called.

Is there any way to trigger the module updaters after each login.

It should be, because the modules can differ per tennant too.

Answers approved by DevExpress Support

created a year ago

Hello Michael,

This behavior is managed by the XafApplication.IsCompatibilityChecked property. In our example, this property stores an individual value for each connection string: BlazorApplication.cs. Please make sure your application has similar code. If this code does not work in your case, you may need to use a tenant ID instead of a connection string.
Please let me know if you need further assistance.

    Comments (2)
    M M
    Michael de Vlieger a year ago

      Hi Anatol,

      I am trying to add Custom Modules to a solution, based on the tennant.
      To perform that, I wrote a test in Blazor Module:

      C#
      [ActivatorUtilitiesConstructor] public BlazorModule(ICurrentTennant tennant):this() { this._tennant = tennant; if (tennant.Code.ToLower() == "test") this.RequiredModuleTypes.Add(typeof(TestModule)); } public BlazorModule() : base() { }

      It seems not to work.
      How to inject in ModuleBase?

      Anatol (DevExpress) a year ago

        Hello Michael,

        I created a separate ticket on your behalf: T1192806: How to use dependency injection in modules. We placed it in our processing queue and will process it shortly.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.