.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

ModelMemberReadOnlyCalculator.AllowPersistentCustomProperties Property

Specifies whether or not creating custom persistent fields at runtime is allowed.

Namespace: DevExpress.ExpressApp.Model.Core

Assembly: DevExpress.ExpressApp.v20.1.dll

Declaration

public static bool AllowPersistentCustomProperties { get; set; }
Public Shared Property AllowPersistentCustomProperties As Boolean

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.

See Also