Skip to main content
A newer version of this page is available. .

XafApplication.CustomizeTableName Event

Occurs when persistent classes found in the application’s modules are loaded to the Application Model.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v18.1.dll

Declaration

public event EventHandler<CustomizeTableNameEventArgs> CustomizeTableName

Event Data

The CustomizeTableName event's data class is CustomizeTableNameEventArgs. The following properties provide information specific to this event:

Property Description
Handled Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing. Inherited from HandledEventArgs.
TableName Specifies the table name corresponding to the persistent class.

Remarks

Handle this event to rename the table that stores objects of a particular persistent class. To access a class metadata, get the XpoCustomizeTableNameEventArgs.ClassInfo property value by casting CustomizeTableNameEventArgs to XpoCustomizeTableNameEventArgs in the CustomizeTableName event handler.

There can be applications where the tables created for custom persistent classes have the same names as the tables created for built-in persistent classes. For instance, since the “Person” class name is used very often, there can be applications where two tables with the “Person” name are used. This situation raises name conflicts. To avoid these conflicts, specify prefixes for table names in a configuration file or via the XafApplication.TablePrefixes property. If you need to rename a particular table which has been renamed, handle this event as well.

See Also