I’m using Entity Framework Reverse Engineer Code First on an existing database. The classes are created properly but I need to change the entity names. I want to prefix every entity class with “EpiFlex”. If a SQL table name is Users, the resulting entity should be EpiFlexUsers and the output file should be EpiFlexUsers.cs.
Is there a tag of some sort that I can add to the beginning of the T4 files to have that prefix added automatically or do I have to painstakingly go through each file and put the prefix ahead of the auto generated code?
Or maybe I’m totally missing the point. Is there another way to specify custom naming of the entities?
There doesn’t seem to be any quick and easy way to do this. However,
Programming Entity Framework 2nd Editionis an excellent book that I’ve come to consider absolutely essential if you’re going to really get into entity framework. This book also has a lot of help on editing the T4 files. I haven’t digested the complete section on T4 editing yet so maybe I’ll still find something that shows how to very easily do what I want.Here is a link to the book. http://shop.oreilly.com/product/9780596807252.do