This project is read-only.

Inheritance and abstract types

Feb 26, 2011 at 12:47 PM

hello

In model i have a PersonBase entity from which derived classes are generated (Male class and female class)

When generating code i want end users to create instanses of male or female but not of type PersonBase.

Is there some way to declare base class as abstract so   new instanses cannot be created from generated code.

 

Ideally a metadata property in the designer ''IsAbstract'' would be the best way for developer to do this.

Thanks

Giannis

Feb 26, 2011 at 1:58 PM

We have toyed around with this idea but it has not been implemented as their are some complications. We will re investigate this pattern, but you are right, currently there is no way to define an abstract base of more concrete children.