EFCoreObjectSpaceProvider<TDbContext>.CheckCompatibilityType Property
Namespace: DevExpress.ExpressApp.EFCore
Assembly:
DevExpress.ExpressApp.EFCore.v25.2.dll
NuGet Package:
DevExpress.ExpressApp.EFCore
Declaration
public CheckCompatibilityType? CheckCompatibilityType { get; set; }
Public Property CheckCompatibilityType As CheckCompatibilityType?
Property Value
Available values:
| Name |
Description |
|
DatabaseSchema
|
XAF performs the following checks:
- The database exists.
- All required tables exist.
- All required columns exist.
The XafApplication.DatabaseVersionMismatch event occurs if any of these checks fails. If the database does not exist, XAF creates the database and required tables. If the database exists, but it is empty, XAF creates the tables. If a column does not exist, XAF adds it to the table.
See also: Update Database Schema and Migrations in EF Core
|
|
ModuleInfo
|
In this mode, XAF creates a ModuleInfo table in the database to check compatibility of an application and its database. This table stores information on the module versions used in the application. When XAF checks 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.
If your application uses Entity Framework Core ORM, register the ModuleInfo type in DbContext.
Each module’s default version value is “1.0.*” (specified by the AssemblyVersion attribute in the Properties\AssemblyInfo.cs file). The asterisk in the version number indicates that build and revision numbers are incremented automatically. XAF updates the version number with each new build. As a result, module versions may become unsynchronized if you build Windows Forms or ASP.NET Core Blazor applications separately (for example, when you create a ClickOnce installation or deploy to IIS).
This mode is more complicated compared to DatabaseSchema, but it helps you ensure both business logic compatibility and data model compatibility. To learn more about this mode, refer to the following topic: Update Application and Database Versions using the ModuleInfo Table.
|
See Also