msawczyn / EFDesigner2022

Entity Framework visual design surface and code-first code generation for EF6, Core and beyond
MIT License
119 stars 21 forks source link

Same entity with multiple navigation properties on same different entity creates invalid classes #50

Closed SimonNeP closed 1 year ago

SimonNeP commented 1 year ago

Hello,

after upgrading to dotnet 6 and the current version of the EF Modeler, there seem to be some issues regarding constructor generation. I have created the following model: image

This did work before updating to Dotnet 6 and the current version. It generated one constructor with al requiered entity and a static "Create" constructor. But now it generates multiple constructors: image

This leads to errors, because different constructors with same signature are created. I did not find any settings to disable this or clues in the documentary

SimonNeP commented 1 year ago

Versions EF Visual Editor: 4.2.1.3 Visual Studio 2022: 17.3.6 Dotnet 6

SimonNeP commented 1 year ago

On the real project it also generated constructors without the dependent properties, which are requiered as well (example config): image

There are two Constructors for the child, one without the parent and the other with the property parent included.

SimonNeP commented 1 year ago

Furthermore it clearly appeared after upgrading from v4.1.2.0 to v4.2.1.3 image

SimonNeP commented 1 year ago

Just wanted to ask if there is any progress for this bug. Also wanted to add that I've been using this tool for roughly two years now and it's great. I have no knowledge of programming tools like this, but if there's sommething I can help with just say so.