Page 1 of 1

ED make property with new or override

Posted: Wed 02 Sep 2015 09:27
by harbran
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?

Re: ED make property with new or override

Posted: Wed 02 Sep 2015 16:49
by Shalex
Please control the behaviour with the Inheritance Modifier attribute of EntityProperty. You can set it via the interface of Entity Developer. Does this help?

Re: ED make property with new or override

Posted: Tue 22 Sep 2015 18:25
by harbran
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?

Re: ED make property with new or override

Posted: Wed 23 Sep 2015 13:53
by Shalex
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.

Re: ED make property with new or override

Posted: Wed 23 Sep 2015 20:02
by harbran
Thank you, that's great!