Creating custom entities?

Thread is closed for posting
2 posts, 1 answers
  1. Andrey
    Andrey avatar
    3 posts
    Member since:
    Feb 2012

    Posted 22 Mar 2012 Link to this post

    Hi Telerik!
     Look I have the following question regarding your OpenAccess orm. Is it possible with your product to define a custom entity which takes half of its properties from one table, the other half from a second table and also a few additional logical properties (for example such one that allows manipulation on the previously-taken properties)? 
  2. Answer
    Zoran avatar
    534 posts

    Posted 27 Mar 2012 Link to this post

    Hi Andrey,

     Yes it is possible to handle such scenario with OpenAccess. The approach you should take though is to create a database VIEW which joins the columns from the different table that you want to present. You can map the view then to an entity as you would map a regular table. You can additionally create a partial class to the one generated by OpenAccess and add some properties that you can calculate out of the existing ones.

    All the best,
    the Telerik team
    Telerik OpenAccess ORM Q1 2012 release is here! Check out what's new or download a free trial >>
Back to Top