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
706 stars 230 forks source link

Namespace not generating correctly #743

Closed pomistea closed 2 years ago

pomistea commented 2 years ago

Hi-

I'm currently using the same settings as I used with v2.32 and the namespace generates fine, there. I've a licence for v2.32 and I'm using a trial licence with v3.5 Namespace generates with a new random number every time, something like this:

namespace Microsoft.VisualStudio.TextTemplatingAB0EB7BB95379970726990CDD3231A48F3797E62E8022B3AD0DE8D94A1B6ADF24521E2771328BCF8F95CD6DC7BDB8922E250C272D00DBA175BEAB81C629496B1

Settings:

Settings.ElementsToGenerate = Elements.Poco | Elements.Context | Elements.Interface | Elements.PocoConfiguration | Elements.Enum;

Settings.PocoNamespace              = ""; // "YourProject.Entities";
Settings.InterfaceNamespace         = ""; // "YourProject.Interfaces";
Settings.PocoConfigurationNamespace = ""; // "YourProject.Configuration";
sjh37 commented 2 years ago

Strangly I have seen this before, however I can't repeat it. Force the correct value by setting the following value in your <database>.tt file.

Settings.Namespace = "your.namespace,here";
pomistea commented 2 years ago

That worked, beautiful!. Settings.Namespace, who knew 😀

Thank you for such a quick response, have a good weekend 🙂