Model methods

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
PeterWood
Posts: 5
Joined: Thu 17 May 2012 14:59

Model methods

Post by PeterWood » Thu 24 May 2012 10:10

Hi -

I am trialing Entity Developer v 4.3.178 building an NHibernate model.

Once I have generated my C# classes, how do I add methods to them without the methods being overwritten if I need to regenerate my model? The "Add Method" button in the ED UI is disabled and there is not Methods node in the Model Explorer as mentioned in the Help file.

Thanks,
Peter

Helen
Devart Team
Posts: 127
Joined: Wed 07 Sep 2011 11:54

Re: Model methods

Post by Helen » Fri 25 May 2012 06:25

PeterWood wrote:The "Add Method" button in the ED UI is disabled and there is not Methods node in the Model Explorer as mentioned in the Help file.
The "Add method to Context Model" button is intended for work with stored procedures, working with which is not supported in NHibernate for now.
PeterWood wrote:Once I have generated my C# classes, how do I add methods to them without the methods being overwritten if I need to regenerate my model?
You can turn on the generation of partial classes in the template (in the Generation section of the Properties window, set the Generate Partial Class parameter of the template to True).
Then generate the partial classes and add method descriptions to them.

PeterWood
Posts: 5
Joined: Thu 17 May 2012 14:59

Re: Model methods

Post by PeterWood » Fri 25 May 2012 07:53

Thanks Helen, I'll see how that goes.

Post Reply