RadPropertyGRid dataannotations and OpenAccessORM

Thread is closed for posting
2 posts, 0 answers
  1. Craig
    Craig avatar
    113 posts
    Member since:
    Nov 2011

    Posted 23 Jan 2013 Link to this post

    I'm using OpenAccessORM and RadPropertyGrid.
    I saw in the RadPropertyGrid demo the use of DataAnnotations. I'd like to make use of them and I would like to define them once in my OpenAccessORM project.
    How do I do it?
  2. Dimitar Tachev
    Dimitar Tachev avatar
    67 posts

    Posted 25 Jan 2013 Link to this post

    Hello Craig,

    If your application is using the Code First approach you could easily set the DataAnnotation attributes directly on the properties of your entities.

    Otherwise in order to use the DataAnnotations with the Telerik OpenAccess ORM we are offering a custom code generation template which is generating buddy classes for your entities. Also this template is automatically generating the Key, Required and StringLength attributes for your properties based on the metadata from your database. 

    After creating these classes you could easily delete the code generation template, add any other needed attributes for the properties and use these buddy classes in your application.

    You could find more information about this template and how to use it in this Code Library example.

    I hope this helps. Do not hesitate to contact us back if you need any further assistance.

    Kind regards,
    Dimitar Tachev
    the Telerik team
    Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
Back to Top