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
Public Event CustomizeTableName As EventHandler(Of CustomizeTableNameEventArgs)

The event handler receives an argument of the CustomizeTableNameEventArgs type. The CustomizeTableNameEventArgs properties provide information specific to this event.

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