Page 1 of 1

Model methods

Posted: Thu 24 May 2012 10:10
by PeterWood
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

Re: Model methods

Posted: Fri 25 May 2012 06:25
by Helen
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.

Re: Model methods

Posted: Fri 25 May 2012 07:53
by PeterWood
Thanks Helen, I'll see how that goes.