Page 1 of 1

How to generate class code with automatic properties

Posted: Tue 25 Sep 2012 16:32
by stan4th
Hi,
when generating nHibernate class code how can I set it to generate properties using automatic properties?
e.g.

Code: Select all

public virtual string Surname { get; set; }
Thanks

Re: How to generate class code with automatic properties

Posted: Thu 27 Sep 2012 16:01
by Shalex
Our code generation requires complete (not automatic) properties.
If you need automatic properties, please modify template with a built-in T4 Editor of Entity Developer.

Re: How to generate class code with automatic properties

Posted: Fri 19 Oct 2012 09:02
by stan4th
Hi Shalex,
could you direct me to where I need to look for instructions on this please?
Many thanks,
John

Re: How to generate class code with automatic properties

Posted: Tue 23 Oct 2012 16:13
by Shalex
Save the model, right click on the template in Model Explorer > Copy to Model Folder. Then double click the template, find the code which generates the properties (the GenerateProperty method) and modify it correspondingly to meet your requirements.

Re: How to generate class code with automatic properties

Posted: Tue 29 Jan 2013 17:14
by Shalex
The behaviour is changed: .NET auto-properties are generated in code if both Property ChangeNotifiers and Property Change Partial Methods properties of a template are set to False. We will post here when the corresponding build of Entity Developer is available for download.

Re: How to generate class code with automatic properties

Posted: Thu 07 Feb 2013 12:41
by Shalex
New build of Entity Developer 5.0.43 is available!
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=32&t=25825.