Auto Generate DataMember For Multiplicity One Property

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
amirmokarram
Posts: 1
Joined: Tue 29 Jul 2014 06:35

Auto Generate DataMember For Multiplicity One Property

Post by amirmokarram » Tue 29 Jul 2014 06:43

Hi there
I want to entity developer to automatically add DataMember attribute to my properties that have Multiplicity One.
example:

Code: Select all

    public partial class PumpJob
    {
        ...

        [DataMember(Order = 10)]
        public virtual string InputFilter
        {
            get;
            set;
        }

        public virtual Storage Storage
        {
            get;
            set;
        }
        ...
    }
As you see in this example Entity Developer did not generate DataMember for Storage Property.

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

Re: Auto Generate DataMember For Multiplicity One Property

Post by Shalex » Fri 01 Aug 2014 16:48

1. Why do you need this attribute for properties that have Multiplicity One?
2. Please specify your ORM (e.g.: NHibernate), your template and its non-default settings. Send us a test model for reproducing the issue.

You can add this attribute via Attributes menu of Entity Developer:
a) navigate to Model > Settings > Attributes > select the assembly with the needed attributes and make sure that the needed attributes (DataMember, etc) are checked in the window below, press OK
b) select the needed attribute in the Attributes collection of a particular class property

Or modify a predefined template: right click on it in Model Explorer > Copy to Model Folder. After this, you can edit it with an embedded T4-Editor.

Post Reply