-
-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicated configuration classes when using EntityTypeConfiguration.t4 #2256
Comments
Where did you get EntityTypeConfiguration.t4 from? It is not a file I am aware of |
I think I downloaded T4 from here. Can you please advise which one I should use? I will compare them. |
I only have these: https://github.com/ErikEJ/EFCorePowerTools/tree/master/samples/CodeTemplates/EFCore Could it be from here? https://github.com/R4ND3LL/EntityFrameworkRuler/blob/main/src/EntityFrameworkRuler.Design/Resources/EntityTypeConfiguration.t4 (I link to it from this issue: #1499 ) |
Use the linked file also depend on changes in DbContext.cs: https://github.com/R4ND3LL/EntityFrameworkRuler/blob/main/src/EntityFrameworkRuler.Design/Resources/DbContext.t4 |
I would just stick with the option in the tool and use the default templates for now (none of the templates linked to above) - or use the set of templates that I provide in my sample folder only. |
You are right I used that one. |
Unfortunately it didn't work for me. I was able to rename properties in Model classes but they remained with the original name in Configuration classes. |
Ah, of course! Then you can uncheck the built-in option I think. |
It is not my problem. Build Action se set to None for all T4 files. I don't understand how can I affect property names generation in Configuration classes from EntityType.T4 file. |
I meant uncheck the; "Split DbContext into Configuration classes" option |
Hello,
we have been using the Reverse Engineer option from EF Core Power Tools for a long time and we are satisfied with it. A few days ago we upgraded to the latest version and found that renaming properties via efpt.property-renaming.json is no longer supported, so we switched to the option to do it via T4. We also use "Split DbContext into Configuration classes" option which ensure that configuration classes are generated to separate folders. Unfortunately, since we started using EntityTypeConfiguration.t4, they are generated in Configurations folder as well as in the root project folder. This means that all classes are duplicated. Why does the generation via EntityTypeConfiguration.t4 not respect the settings and does not generate the configuration classes only to Configurations folders?
The text was updated successfully, but these errors were encountered: