sjh37 / EntityFramework-Reverse-POCO-Code-First-Generator

EntityFramework Reverse POCO Code First Generator - Beautifully generated code that is fully customisable. This generator creates code as if you reverse engineered a database and lovingly created the code by hand. It is free to academics (you need a .edu or a .ac email address), not free for commercial use. Obtain your licence from
https://www.reversepoco.co.uk/
Other
700 stars 230 forks source link

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

Open rajukumar-jha opened 1 year ago

rajukumar-jha commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Hi,

Thank you! Please add the namespace and update us.

rajukumar-jha commented 12 months ago

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