"User code" module generates always

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
-marcelo-
Posts: 26
Joined: Wed 28 Jun 2017 12:35

"User code" module generates always

Post by -marcelo- » Thu 10 Aug 2017 16:07

I have two settings regarding code generation
a) File per class (so every entity is in its own file)
b) Generate two files for every class: one suffixed .Generated, which carries all the "standard" code (fields, attributes to link to the table, properties, child collections and the like ) and another, where I could put my own business code for the class/entity.

When I run code generation, always Entity developer writes the two files, the ".Generated" one but also the "user code" one.
I cannot find where to change this behaviour.
Could someone help me?

TIA

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: "User code" module generates always

Post by Shalex » Fri 11 Aug 2017 13:07

-marcelo- wrote:When I run code generation, always Entity developer writes the two files, the ".Generated" one but also the "user code" one.
We cannot reproduce the problem in our environment at the moment.

Please specify:
1) your current version (x.x.x) of Entity Developer. You can check it via Entity Developer > Help > About (or Visual Studio > Tools > Entity Developer > About). Does the issue persist with the newest (6.1.311) build?
2) are you using a standalone Entity Developer or the one integrated in Visual Studio?
3) your ORM is LinqConnect (*.lqml), isn't it?
4) specify the version of your Visual Studio (via Help > About)
5) your project type (.NET Framework or .NET Core)

-marcelo-
Posts: 26
Joined: Wed 28 Jun 2017 12:35

Re: "User code" module generates always

Post by -marcelo- » Fri 11 Aug 2017 16:58

Please specify:
1) Entity Developer 5.7.586. I don´t know if I could upgrade to 6.1.311, because license expiration.
2) Using E-D as standalone
3) Yes, it´s LinqConnect (*.lqml).
4) Even if not using from within it, it´s VS 2013
5) .NET

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: "User code" module generates always

Post by Shalex » Mon 14 Aug 2017 13:19

We cannot reproduce the issue in our environment.

1. Please open your *.lqml model, navigate to Model Explorer > Templates, select the LinqConnect template and press F4 (Properties), make sure that both "File Per Class" and "Generate Partial Class" properties are set to True. Does this fix the problem?

2. Check a workability of the newest trial version of LinqConnect (download link). Does it work with no issues?

-marcelo-
Posts: 26
Joined: Wed 28 Jun 2017 12:35

Re: "User code" module generates always

Post by -marcelo- » Tue 15 Aug 2017 13:40

I am using LinqConnect template, and of course, "Generate partial class" and "File per class" settings are set to true.
Just now, I regenerated all code, but this time de "user code file" was not overwritten.
Sorry, I cannot say what happened.
Thank you.

Post Reply