Mapping Table Names

dotEntity, by default uses your entity's Class Name as preferred table name. You can however setup configuration to change the name of tables.

This is done by calling MapTableNameForType method of DotEntityDb class.

Syntax

DotEntityDb.MapTableNameForType<ENTITY_TYPE_CLASS>("<Name of table>");

Example

The following example shows changing the table name of our class Product to 'Products'

DotEntityDb.MapTableNameForType<Product>("Products");