EntityFramework-Reverse-POCO-Code-First-Generator
EntityFramework-Reverse-POCO-Code-First-Generator copied to clipboard
Adding the Folder Name to Project Namespaces only for POCO generated Entities & Interface
Hi @sjh37 When we generate Database.tt file we get the Entities & Interface Folders with respective files too.
But somehow the Folder name is not getting attached to the Namespace like how it does for the Controllers (Eg:- namespace ProjectName.Controllers).
To help you understand better the scenario I am attaching the screenshot.
Can you please help me where exactly shall I edit in my Database.tt file to get it working as expected.
Let me know if you have any further queries of any clarification needed. Thanks
Hi, That missing folder for the namespace is actually on purpose, as all the entities, controllers, etc, are all in the same namespace and don't require extra using to be setup by you. Let me know if you still would like it set.
Hi @sjh37, We are following the Clean Architecture pattern and we are keeping the Entities, Interface and Data Context folder in a separate class library with respective folders and only it's referencing is used in other Class Libraries containing Repository & Controllers. Please suggest a possible way to add the folder Name to namespaces.
Also, could you please suggest if there's any way to restrict from Other Team Members the Database.tt File? I mean only people who have license on their machine can only Open the Database.tt file and not everyone.
Thanking you in anticipation.
Hi,
- I will leave this case open so I can add the namespace for you. However, it could possibly be a month before I can get to this.
- You can't restrict people from opening any T4 template file on their computer. A developer running the T4 template without a licence will default to a Trial licence.
Hi,
Thank you! Please add the namespace and update us.
Hello @sjh37 Do we have an update on my above query, please? Appreciate your support