Way to modelling inheritance without the designer

Thread is closed for posting
3 posts, 0 answers
  1. Norbert
    Norbert avatar
    35 posts
    Member since:
    Dec 2009

    Posted 14 Oct 2011 Link to this post


    Can you tell me if there is a possibility to extend the generated domain classes with interfaces, abstract classes etc.?
    Because the classes are partial I can do but the designer doesn't "recognize" that and when I want to update my database schema it's not associated with the changes.

    For my understanding I have to model inheritance within the designer and extensions (almost ever methods) with separated partial class files.

    Just give me a sign,
    thank you in advance
  2. Ivailo
    Ivailo avatar
    318 posts

    Posted 18 Oct 2011 Link to this post

    Hello Norbert,

    Interfaces are something you can use with Telerik OpenAccess ORM in a two different ways. First, you can create interfaces in your Visual Designer, so that they will be part of the automatic code generation and the properties will be persistent. This functionality is not finalized yet - you will not be able to use the classes implementing an interface in a polymorphic manner. We are planning to include this feature in one of the future releases.

    The other option would be to define the interfaces separately and implement them in partial classes (for your Domain Classes), which will be relatively independent from the auto-generated classes. This way you will prevent your implementation from being replaced by the code generation. The disadvantage is that the fields of those interfaces will not be persistent at all.

    As per the abstract classes, they do not have direct representation in the Visual Designer, so you will have to follow the partial classes approach. In case your abstract classes have some persistent properties, you can model them as normal Domain Classes and limit their usage otherwise, like a private constructor for example.

    Do not hesitate to get back to us if you have any questions.

    Best wishes,
    the Telerik team

    Check out the latest stable build of Telerik OpenAccess ORM. Download it and benefit from our new Project Templates.

  3. Norbert
    Norbert avatar
    35 posts
    Member since:
    Dec 2009

    Posted 24 Jul 2012 Link to this post


    thank you for answering!
    I will use OA only for database access snd perform any modelling on the business layer I think.

    Because I have to work with a large amount of data I have to design the database model first, thats often not the perfect domain odel ;-)

    regards Norbert
Back to Top