Skip to content
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

Adding the Folder Name to Project Namespaces only for POCO generated Entities & Interface #800

Open
rajukumar-jha opened this issue Mar 21, 2023 · 5 comments

Comments

@rajukumar-jha
Copy link

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

image

@sjh37
Copy link
Owner

sjh37 commented Mar 21, 2023

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.

@rajukumar-jha
Copy link
Author

rajukumar-jha commented Mar 22, 2023

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.

@sjh37
Copy link
Owner

sjh37 commented Mar 22, 2023

Hi,

  1. 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.
  2. 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.

@rajukumar-jha
Copy link
Author

Hi,

Thank you! Please add the namespace and update us.

@rajukumar-jha
Copy link
Author

Hello @sjh37 Do we have an update on my above query, please? Appreciate your support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants