We're using Entity Framework 5 model first design. We decided to rename the .edmx file but the MyModel.Context.tt and MyModel.tt files can't be renamed. The File Name property is read only and I can't find a reference to the file name elsewhere. Anyone know how to rename them?
The work-around seems to be to let it generate the .tt files as it wants. Rename the .edmx. When you rename the edmx, there are references to the .edmx in the .tt files which don't get changed either. You could edit the .tt files to reference the new name for the .edmx, but that doesn't rename the .tt files, so instead delete both .tt files. Go to the .edmx diagram, right-click and add code generation item. Choose a DBContext generator, name it as you please, and click "add". Bob is now your uncle.
Per this, the inability to rename seems to be desired behavior: http://entityframework.codeplex.com/workitem/523
JR
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With