ModelMemberReadOnlyCalculator.AllowPersistentCustomProperties Property
Specifies whether or not creating custom persistent fields at runtime is allowed.
Namespace: DevExpress.ExpressApp.Model.Core
Assembly: DevExpress.ExpressApp.v24.1.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Property Value
Type | Description |
---|---|
Boolean | true, when creating custom persistent fields at runtime is allowed; otherwise - false. |
Remarks
By default, creation of custom persistent fields is allowed only at design time (the IModelMember.IsCalculated property is readonly and set to true by default at runtime). To allow end users to add custom persistent fields at runtime, set the AllowPersistentCustomProperties property to true. To allow updating the database schema at runtime, set the XafApplication.DatabaseUpdateMode property to DatabaseUpdateMode.UpdateDatabaseAlways. A column mapped to the current field will be added to the database table automatically.
Note
Generally, persistent fields are supposed to be added only at design time. It is a bad practice to allow end users to alter the database schema - allow this only as a last resort.