Guys am working on an Asp.Net MVC project that already is using a repository pattern for fetching data from MS SQL Server database.
I now intend to use Entity Framework for some new particular requirement of our project without disturbing the old repository logic. I have used EF Power tool Beta 3 and Reverse Engineered my database tables from Visual Studio, but the generated classes conflict with some of my existing repository classes which have the same name to their corresponding table in database, making the project unable to compile. I have looked upon this tutorial
But this tells about appending "tbl" prefix to table names and not changing generated class names. I myself however tried to change the generated class names in templates (present under CodeTemplates\ReverseEngineerCodeFirst but still they are generating with conflicts.
My question is what should I do to achieve my intended result (no conflicts with existing classes in project) or should I adopt some other alternative altogether ? Thanks for helping.
I know it is an old question but this can come handy to somebody.
I needed to rename scaffolded classes from DBS as well. In my case I wanted to add
Entity
suffix.So in case you use EF Power Tools create on the TOP of project structure file:
efpt.renaming.json
with following content:Each DBS schema should be specified, in my case 3. Then make sure in your file
efpt.config.json
you have specified value:because if it is
true
those renaming changes wont be applied. You can also find this option in the EFPT User Interface here (make it disabled):After all these changes are done then start EF Power tool reverse engineering and your new entities should be created with new names.