Specifies how the database and application compatibility is checked.
A CheckCompatibilityType enumeration value specifying how the database and application compatibility is checked.
You can set CheckCompatibilityType to the following values.
The following checks are performed utilizing native XPO approaches:
The XafApplication.DatabaseVersionMismatch event occurs if any of these checks fails.
In the ModuleInfo mode, a ModuleInfo table is created in the database to check the compatibility of an application and its database. This table stores information on the module versions used in the application. When checking the compatibility of the database and the application, the versions stored in the ModuleInfo table are compared with actual module versions. The XafApplication.DatabaseVersionMismatch event occurs in case of a mismatch.
By default, each module’s version is set to “1.0.*“ using the AssemblyVersion attribute in the Properties\AssemblyInfo.cs file. The asterisk sign in the version indicates that the build and revision numbers in the version are autoincremented, and so the version value is updated with each new build. As a result, the WinForms and ASP.NET Web Forms module versions may become unsynchronized if you build WinForms and ASP.NET Web Forms applications separately (e.g, when creating a ClickOnce installation or deploying to IIS).
Note that the use of the ModuleInfo mode is more complicated, but it allows ensuring the business logic compatibility in addition to the data model compatibility. To learn more about this mode, refer to the Update Application and Database Versions using the ModuleInfo Table topic.
The CheckCompatibilityType property value can be changed in the Application Designer:
By default, CheckCompatibilityType is set to ModuleInfo in XafApplication code. However, the default value is overridden to DatabaseSchema in code generated by the Solution Wizard. This is done to keep the behavior of applications created in earlier versions unchanged.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the CheckCompatibilityType property.
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.