Creating custom entities?

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
    Admin
    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,
    Zoran
    the Telerik team
    Telerik OpenAccess ORM Q1 2012 release is here! Check out what's new or download a free trial >>
  3. DevCraft banner
Back to Top