Generate MetaData-Classes automatically from model

Thread is closed for posting
2 posts, 0 answers
  1. uquandux
    uquandux avatar
    2 posts
    Member since:
    May 2008

    Posted 14 Nov 2012 Link to this post

    Hi everyone,

    I have my OA database-model (rlinq) up and running in combination
    with a MVC-application. I want to generate Partitial Classes to have
    annotations for the different properties so my MVC-application can
    handle validation.

    According to this manual are MetaData-Classes created manually:

    My Question is: Is there a way to generate those classes automatically from my database-model?

    Best regards,
  2. Boris Georgiev
    Boris Georgiev avatar
    190 posts

    Posted 14 Nov 2012 Link to this post


    Yes, you can generate automatically data annotations to your entity classes based on the metadata model. We have a Code Library article that describes it and provides a template you can use to generate quickly some types of data annotation attributes after you make changes in your model. 

    Let me know if you need additional directions.

    Regards, Boris Georgiev
    the Telerik team
    Telerik OpenAccess ORM Meets ASP.NET Web API. Read more.
Back to Top