Question

Is it possible to reflect a database table name change in an .edmx file by simply using the XML Editor? I was hoping that making this change in the EntitySet node would be sufficient, but it seems not.

Receive a "error 0040: <> type is not defined in namespace <>" message.

This is purely a database table name change with no structural changes to the table and we are using POCO objects with EF.

Thanks in advance.

Was it helpful?

Solution 2

It seems that we can do this through the XML Editor; given that we are just doing a table rename and not changing the structure of the table in itself.

In our case it makes sense as the original database was not pluralizing the table so we just had to add a 's' or an 'es' in most cases; so we did not have to make any changes to the conceptual model.

Under the --> change the Table attribute to your new table name.

Ref: Change db table name in EF4 (entity framework 4)

OTHER TIPS

Yes, it's possible but very very messy.

You need to change the SSDL as well as the CSDL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top