ED make property with new or override

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
harbran
Posts: 3
Joined: Wed 02 Sep 2015 09:12

ED make property with new or override

Post by harbran » Wed 02 Sep 2015 09:27

I create code-first pocos with partial classes. The partial class is inheriting from an object that has Id and Name properties as required by other code. All works fine, but VS complains about a missing new on auto-generated part of partial class for properties Id and Name.
Is there a means in ED for explicitly setting some properties to be generated with new or override?

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

Re: ED make property with new or override

Post by Shalex » Wed 02 Sep 2015 16:49

Please control the behaviour with the Inheritance Modifier attribute of EntityProperty. You can set it via the interface of Entity Developer. Does this help?

harbran
Posts: 3
Joined: Wed 02 Sep 2015 09:12

Re: ED make property with new or override

Post by harbran » Tue 22 Sep 2015 18:25

Thank you. I finally found this and it works as expected.
However, there is no way to define this onece for alle tables that contain an ID and NAME column? I have to do it manually by table, right?

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

Re: ED make property with new or override

Post by Shalex » Wed 23 Sep 2015 13:53

Please open Model Explorer, press Ctrl+F, type ID, check "Match whole word" to select all ID properties, press F4 (Properties) and change settings for all IDs simultaneously. The walkthrough for "NAME" is the same.

harbran
Posts: 3
Joined: Wed 02 Sep 2015 09:12

Re: ED make property with new or override

Post by harbran » Wed 23 Sep 2015 20:02

Thank you, that's great!

Post Reply