Create EntityModel using a Stored Procedure

3 posts, 1 answers
  1. Anderson
    Anderson avatar
    14 posts
    Member since:
    Dec 2013

    Posted 17 Jan 2014 Link to this post

    Hi,

    I was wondering if there was a method of using the result of a stored procedure to generate the domain model.

    I understand that I can give OpenAccess ORM an existing table in my DB and it will create a matching EntityModel for it, but because of how our data warehouse is set up, I would like to have a stored procedure draw from the various tables, and have the result be the Domain model that is created.

    Thanks
  2. Answer
    Kaloyan Nikolov
    Admin
    Kaloyan Nikolov avatar
    118 posts

    Posted 22 Jan 2014 Link to this post

    Hello Anderson,

    Telerik OpenAccess ORM offers two options in this direction:
    1. You could map your tables in such way that all CUD operations will be performed as stored procedures . The select queries still will be performed directly against the table which will give you the possibility to use LINQ queries. As a result you will have an endpoint in your context class for each mapped table

    2. You could map your stored procedures as Domain Methods. You will be able to invoke the CRUD store procedures but this approach doesn't support LINQ queries. 

    I hope this helps. Please do not hesitate to get back to us with any further questions. 

    Regards,
    Kaloyan Nikolov
    Telerik
    OpenAccess ORM Q3 2013 simplifies your model operations even further providing you with greater flexibility. Check out the list of new features shipped with our latest release!
  3. DevCraft banner
  4. Anderson
    Anderson avatar
    14 posts
    Member since:
    Dec 2013

    Posted 22 Jan 2014 Link to this post

    Thanks.
Back to Top