Urgent : Error after update to version 14.2.4

StatusIDPriorityType
Closed22817CriticalQuestion
ProfileReply
niemimikClient

Hi!

We receiving error on startup programs runs but we do not have access to model editor at design time on any module!!
Cannot find anything on domentation.

Error : Use XafariModelDifferencesDbModule instead.
Parameter name: Xafari.DatabaseUserSettings.DatabaseUserSettingsModule

Attached files:

Replies

UserDescriptionPosted On
Sasha (Xafari Support)Agent

Hello,

You should use XafariModelDifferencesDbModule instead of DatabaseUserSettingsModule.

DatabaseUserSettingsModule is obsolete. So if you want to save Model in DB please use Xafari module XafariModelDifferencesDbModule.

Please see attached file Fixing.png.

We will post piece of documentation about XafariModelDifferencesDbModule in this ticket soon.

Or you can use core DevExpress, please follow:
- How to: Store the Application Model Differences in the Database
- User Settings Stored in the Application Database

Feel free to contact us if you have any question.

Thanks, Sasha.

Attached files:
niemimik

Hi!

Great! That solve the issue!! Thanks!!

Any estimate when documentation (english)for new features will be available?

-mikko

Sasha (Xafari Support)Agent

Hi,

We will post piece of documentation about XafariModelDifferencesDbModule in this ticket tomorrow.

Sasha.

Sasha (Xafari Support)Agent

Hello Mikko,

Piece of documentation about XafariModelDifferencesDbModule you can read below:

Storing Model Differences in the database. Xafari.ModelDifferencesDb module

Xafari.ModelDifferencesDb module provides the feature to store Model Differences and User Model Differences in the database. To implement this feature, follow the steps described below.

• Add Xafari.Win. XafariWinModule to your platform-dependent Win-module (or add Xafari.Web.XafariWebModule to your platform-dependent Web-module). Add modules using the designer or in code directly.
• Add Xafari.ModelDifferencesDb.XafariModelDifferencesDbModule to your platform-dependent Win (or Web) module.
Note. It is very important to observe the described order. You should firstly add XafariWin(Web)Module, and only then add XafariModelDifferencesDbModule to your platform-dependent module. The fact that XafariWinModule (or XafariWebModule) creates its own instance of the Store Factory. The described initialisation order allows for XafariModelDifferencesDbModule correctly create its own instance of the StoreFactory.

• Set static fields of the Xafari.ModelDifferencesDb.XafariModelDifferencesDbModule class: EnableModelDifferencePermissionsCheck, StoreUserModelDifferencesInDb, StoreModelDifferencesInDb. Required values are described in class documentation.
• To work with the database, configure the ConnectionString in the application config-file.

If Win and Web applications will work together with a common database, then setting of the same user will also be used in conjunction. This is not always desirable because some settings of the Model differs for Win and Web. For example, various Property Editors may be used. In this case, to separate settings for different platforms, you can use the ExtendCode(string) method (see Xafari.CustomizeModelDifferenceStoreParamsEventArgs section). For example, with it, you can specify «WEB» extension for web-module.

public TestSolutionDiffsDbStoreAspNetModule()
{
  InitializeComponent();
  ModelDifferenceStoreManager.Instance.BeforeChangeStoreFactory += 
  OnBeforeChangeStoreFactory;
  ModelDifferenceStoreManager.Instance.AfterChangeStoreFactory += 
  OnAfterChangeStoreFactory;
}
private void OnAfterChangeStoreFactory (object sender, ChangeStoreFactoryEventArgs e)
{
  if (e.StoreFactory != null)
    e.StoreFactory.CustomizeModelDifferenceStoreParams += OnCustomizeParams;
}
private void OnBeforeChangeStoreFactory (object sender, ChangeStoreFactoryEventArgs e)
{
  if (e.StoreFactory != null)
    e.StoreFactory.CustomizeModelDifferenceStoreParams -= OnCustomizeParams;
}
private void OnCustomizeParams (object sender, ModelDifferenceStoreParamsEventArgs e)
{
  e.ExtendCode("WEB");
}

Code snippet.

Xafari. ModelDifferenceStoreParamsEventArgs
Xafari.ModelDifferenceStoreFactory class generates CustomizeModelDifferenceSoreParams и CustomizeUserModelDifferenceSoreParams events. ModelDifferenceStoreParamsEventArgs class is a parameter of this events. It exposes ExtendCode(string) method and Code property.
Application code reads (writes) Model Differences aspects using search key. ExtendCode method extends the search key by adding new segments. When searching, framework sorts segments in ascending order. Then segments are concatenated into a single string. The resulting string is the search key. Code property provides the key to search the aspect.
That is, for example, one user may have multiple different independent User Model Differences, if necessary.

I hope you find the information helpful.

Sasha

× This ticket is closed.

Write US