Does anyone know how to change the mapped db table for an entity in EF4 (entity framework 4)?
Later edit: I think i've found the place where the table names are defined, in the model browser. But their names are readonly, so it's not possible to edit them using the designer. Also, there's no reference (from what i've searched) to the table name in the xml schema.
If you just need to change the name of the table you can:
<EntitySet Name="Customers" EntityType="ExampleModel.Store.Customers" Schema="dbo" />
. Table="MyTableName"
attribute. <EntitySet Name="Customers" EntityType="ExampleModel.Store.Customers" Schema="dbo" Table="MyTableName" />
Here is a complete CSDL, SSDL, MSL specification.
Hope that helps.